Skip to content

feat(backend): 同步 ZZZ backend 演进(open_game + click/input/screen_area CRUD,7→11 tool) - #605

Closed
DoctorReid wants to merge 266 commits into
mainfrom
feat/mcp-backend-sync2
Closed

DoctorReid wants to merge 266 commits into
mainfrom
feat/mcp-backend-sync2

Conversation

@DoctorReid

@DoctorReid DoctorReid commented Jul 6, 2026 •

Copy link
Copy Markdown
Collaborator

概述

同步 ZZZ(绝区零一条龙)backend 最新演进到 SR。open_and_enter_game 被更细粒度工具取代,7 → 11 tool。照搬 ZZZ 已验证实现 + token 清单(common-package-sync.md §5)适配。承接已关闭的 #604(其 review 修复 c4743d81 未进 main,本 PR 一并带入)。

工具变化(7 → 11)

新增 取代/说明
open_game(enter=True, block=True) 取代 open_and_enter_game;enter=False 只打开不登录(分步驱动登录)
click_game(x, y, press_time=0) 1080p 游戏空间坐标点击
input_text(text, use_clipboard=None) 剪贴板/逐键(跟 game_config.type_input_way,可覆盖),返回脱敏文本
upsert_screen_area(...) screen area CRUD(新增/更新,写 yml + reload)
delete_screen_area(screen_name, area_name) screen area 删除

保留:check_game_window / capture_game_screen / analyze_screen(+screenshot 参)/ close_game / get_run_status / stop_run。

改动

  • common screen_info.py:+upsert_area / remove_area_by_name(screen_area 工具依赖,one_dragon 公共框架)
  • backend backend_context.py:+ click_game / input_text / upsert_screen_area / delete_screen_area 切片 + analyze 按截图文件/图名解析;重提 RunSlot executor shutdown(ZZZ 仍未修,照搬会丢失,SR 保留修复)
  • mcp/app.py:open_and_enter_game → open_game + 4 新工具
  • docs:mcp 工具表 7→11(ZZZ doc 漏列 upsert/delete_screen_area,SR 补上);architecture/mcp/http 等随 ZZZ 最新
  • feat: MCP backend 运行态完善 + AI 编码 harness + runtime 启动器 + dev skills #604 review 修复(c4743d81):build_full.bat config 目录、common-sync 表格 \|、daemon 精确 argv 匹配、backend_context executor shutdown —— 本 PR 带入 main

验证

  • 108 测试全过(sr-od-test be58691:test_mcp_app 更新 + 5 新测试含 test_click_game/input_text/run_slot/close_game + conftest)
  • pyright 0 error(backend + screen_info)
  • 残留 grep CLEAN(含 ZPcController→SrPcController、spec 路径 2026-07-05、裸端口等 token 缺口)
  • 静态装配 ok;RunSlot.shutdown 就位

照搬 ZZZ commit

2d73af97(open_game+click+input MCP) · 80bf5bd3(input_text 切片) · 7b102f38(click_game 切片) · 9972ba18(screen_info area CRUD) · 53bc2823(analyze 按截图解析) · 8087f220(mcp doc 7→9)

端口

主 server 24001、daemon 24000(避与 ZZZ 同机冲突)。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 新功能
    • 新增 MCP/HTTP 服务,支持窗口查询、截图分析、游戏操作及任务运行。
    • 新增应用通知设置,可分别配置生命周期与节点详情通知。
    • 支持 PP-OCRv6,并增强 GPU 推理稳定性。
    • 新增运行时启动器、自动更新与依赖同步。
  • 体验优化
    • 改进鼠标操作、滚动区域及中文路径图片读写。
    • 新增强制重新登录、应用顺序持久化和删除确认。
  • Bug 修复
    • 修复空计划可能导致的循环问题及战斗失败识别问题。
  • 文档与测试
    • 补充快速开始、后端服务、玩法说明及自动化测试流程。

DoctorReid and others added 12 commits July 5, 2026 17:02
照搬 ZZZ docs/develop/one_dragon/runtime_launcher.md,命名替换(zzz_od→sr_od、
ZLauncher→SrLauncher、绝区零→星穹铁道、app.py→sr_full_app.py);CI/产物段
适配 SR 现状(无 CI、build_full.bat 产物 StarRailOneDragon*.zip、完整包不含 src)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- skills/sr-od-dev-{deciding-a-fix,pr-finishing,skill-guide}/(SKILL.md + design.md),从 ZZZ 同步并按 token 清单适配(CodeRabbit 内容保留)
- ai_coding.md:加「推荐安装 superpowers」节、symlink→junction(mklink /J 免管理员)、skill 表更新
- quickstart.md:新建,从 ZZZ 适配(sr_full_app.py / 端口 24001 / sr_od backend / sr-od-test)
- entry_files.md:补 path-scoped rule 说明段(非 always-on 规范在 AGENTS.md 提及并指向 docs)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- README.md:方向A 补 superpowers+skills/ 方法论;方向B「暂未实施」→「已落地」(SrBackendContext / 4 tool / 端口 24001 / sr_od/backend);A-2/B-1 状态表更新;entry-files 表加 skills/ 行
- settings_scope.md:坑1 例子改 sr_od;表格行「无项目自有 MCP」→ 3 个 mcp__*(context7/sr_od/sr_od_daemon);整体归口补 server 定义落点

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- ZZZ 397b5b22 新增的 one_dragon/base/screen/screen_match.py(ScreenMatch dataclass + find_screen_matches)
- SR 的 one_dragon 其余部分已与 ZZZ 对齐,本次实质新增仅此一文件
- 验证:文件数 205、pyright 0 error、GUI 启动 OK、sr_od 零失配
- 解锁 Phase B:sr_od/backend analyze 画面匹配增强

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- schemas: + RunStatusResult、AnalyzeScreenResult +screens(import ScreenMatch)
- backend_context: + RunSlot 单跑道(start_run/query_status/stop)+ close_game + analyze 增强画面匹配
- mcp/app: 7 tool 工厂模式(+ get_run_status/stop_run/close_game,enter 加 block)
- http/routes: 7 端点(+ status/stop/close,enter 改 start_run)
- entry: docstring 勘误 4→7 tool
照搬 ZZZ backend 演进,token 清单适配(enter_game 单→复、sr_od_mcp 等)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- README/architecture/mcp/http/entry 更新为运行态版本(7 tool、7 端点、start_run/query_status/stop、close_game)
- 新增 design-principles.md(backend 设计原则 P1-P12)
- 适配 async-operation 设计 spec(docs/superpowers/specs/,gitignore 不入库)
- 通读勘误:README tool 数 4→7;architecture ZPcController→SrPcController;删 SR 不存在的 one_dragon_architecture.md 链接
照搬 ZZZ backend 文档,token 清单适配(sr_od 路径、端口 24001 等)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…te-design)

final review 发现:B3 sed 集(代码文件)未覆盖 spec 文件名 token,
backend_context.py:64 仍指向 ZZZ 的 2026-07-02 spec(SR 已适配为 2026-07-05)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…匹配 + 7 tool/7 端点 + docs)

- common: 带进 screen_match.py(analyze 画面匹配依赖)
- backend: RunSlot 运行态管理(start_run/query_status/stop)+ close_game + analyze 增强
- mcp: 7 tool(+ get_run_status/stop_run/close_game,enter 加 block)
- http: 7 端点(+ status/stop/close,enter 改 start_run)
- docs: 运行态文档 + design-principles + adapted spec
- tests: 74 用例(sr-od-test)
照搬 ZZZ backend 演进,token 清单适配 SR。final opus review clean。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
MCP backend 照搬轮靠通读/final review 抓到 5 类 sed+grep 都漏的 token:
- 端口 sed 须用裸形式(不带反引号)
- 小写前缀 zzz_backend_run(thread_name_prefix)
- Z 前缀业务子类 ZPcController
- 英文游戏名字面量 ZenlessZoneZero
- 端口片段 :2300(findstr)
- spec 文件名引用
§5.2 残留 grep pattern 同步补 Zenless|ZPc|zzz_backend|:2300。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- build_full.bat: copy 前先 mkdir config 目录(原 copy 到不存在的 config/ 会失败,包里缺 config/project.yml;ZZZ 也有此 bug)
- common-package-sync.md: 表格内转义 |(markdown 列解析,markdownlint MD056)
- backend_context: SrBackendContext.shutdown() 关闭 RunSlot._executor(原漏关致线程泄漏;加 RunSlot.shutdown() 封装)
- sr_od_daemon: 主 server 进程检测改精确 argv 匹配(-m sr_od.backend.entry.server),避免子串误匹配;与同文件 --port 解析风格一致

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…en_area CRUD,7→11 tool)

- common: screen_info +upsert_area/remove_area_by_name(screen_area 工具依赖)
- backend_context: + click_game/input_text/upsert_screen_area/delete_screen_area 切片 + analyze 按截图文件/图名解析;重提 RunSlot executor shutdown(ZZZ 仍未修,SR 保留)
- mcp/app: open_and_enter_game → open_game(enter) + click_game + input_text + upsert/delete_screen_area(11 tool)
- http/routes: ZZZ 未新增端点(新工具仅 MCP 暴露),diff 后确认 SR 现状已正确,no-op
- entry/server: docstring 工具数 7→11

照搬 ZZZ backend 最新(2d73af97 / 7b102f38 / 80bf5bd3 / 9972ba18 / 53bc2823 共 5 commit),token 清单适配。
残留 grep 全 CLEAN;pyright 0 error;assembly ok;50 passed/5 failed(fail 均为 open_and_enter_game→open_game 签名变更,测试更新留待后续)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…input/screen_area CRUD)

- mcp.md: 工具表更新(open_and_enter_game → open_game(enter) + click_game + input_text);ZZZ doc 漏列 upsert/delete_screen_area,SR 补上(11 tool)
- 其余 backend doc 随 ZZZ 最新同步(token 适配)
照搬 ZZZ backend 文档(8087f220 等)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 347 files, which is 197 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f2eb80f4-0d6c-4402-93ef-b13134af64ae

📥 Commits

Reviewing files that changed from the base of the PR and between f24784b and ab2809c.

⛔ Files ignored due to path filters (305)
  • assets/template/character_cw_portrait/Archer/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/Momojie/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/Saber/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/万敌/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/三月七/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/不死途/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/丹恒·腾荒/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/丹恒·饮月/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/乱破/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/云璃/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/佩拉/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/停云/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/傑帕德/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/刃/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/刻律德菈/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/千冶·刃/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/卡芙卡/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/吉尔伽美什/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/大丽花/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/大黑塔/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/姬子/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/姬子·启行/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/娜塔莎/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/布洛妮娅/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/希儿/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/彦卿/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/忘归人/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/托帕&账账/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/昔涟/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/星期日/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/景元/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/杰帕德/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/桑博/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/椒丘/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/波提欧/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/流萤/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/海瑟音/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/火花/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/灵砂/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/爻光/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/瓦尔特/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/白厄/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/真理医生/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/知更鸟/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/砂金/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/符玄/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/绯英/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/缇宝/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/罗刹/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/翡翠/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/艾丝妲/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/花火/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/藿藿/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/貊泽/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/赛飞儿/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/远坂凛/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/遐蝶/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/那刻夏/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/银枝/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/银狼/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/银狼LV.999/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/镜流/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/长夜月/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/阮·梅/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/阿格莱雅/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/青雀/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/风堇/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/飞霄/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/黄泉/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/黑塔/raw.png is excluded by !**/*.png
  • assets/template/character_cw_portrait/黑天鹅/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/Archer/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/Saber/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/万敌/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/三月七/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/不死途/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/丹恒·腾荒/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/丹恒·饮月/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/乱破/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/云璃/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/佩拉/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/刃/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/刻律德菈/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/加拉赫/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/千冶·刃/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/卡芙卡/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/吉尔伽美什/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/大丽花/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/大黑塔/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/姬子/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/姬子·启行/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/娜塔莎/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/布洛妮娅/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/希儿/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/开拓者·欢愉/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/开拓者·记忆/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/彦卿/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/忘归人/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/托帕&账账/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/昔涟/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/星期日/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/景元/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/杰帕德/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/桑博/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/椒丘/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/波提欧/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/流萤/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/海瑟音/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/火花/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/灵砂/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/爻光/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/瓦尔特/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/白厄/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/真理医生/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/知更鸟/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/砂金/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/符玄/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/绯英/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/缇宝/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/罗刹/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/翡翠/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/艾丝妲/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/花火/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/藿藿/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/貊泽/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/赛飞儿/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/远坂凛/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/遐蝶/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/那刻夏/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/银枝/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/银狼/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/银狼LV.999/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/镜流/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/长夜月/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/阮·梅/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/阿格莱雅/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/青雀/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/风堇/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/飞霄/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/黄泉/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/黑塔/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait/黑天鹅/raw.png is excluded by !**/*.png
  • assets/template/currency_war_portrait_unlabeled/screenshot_20260804_003849_033005_c21_Momojie.png is excluded by !**/*.png
  • assets/template/currency_war_portrait_unlabeled/screenshot_20260804_014306_198401_c7_Momojie.png is excluded by !**/*.png
  • assets/template/cw_equip/仙舟星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/以太钻头.png is excluded by !**/*.png
  • assets/template/cw_equip/以牙还牙甲.png is excluded by !**/*.png
  • assets/template/cw_equip/以牙还牙甲·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/信心注入器.png is excluded by !**/*.png
  • assets/template/cw_equip/信心注入器·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/光能电池.png is excluded by !**/*.png
  • assets/template/cw_equip/光能盾牌.png is excluded by !**/*.png
  • assets/template/cw_equip/光能盾牌·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/光速螺旋桨.png is excluded by !**/*.png
  • assets/template/cw_equip/光速螺旋桨·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/冶金炉.png is excluded by !**/*.png
  • assets/template/cw_equip/冷笑话引擎.png is excluded by !**/*.png
  • assets/template/cw_equip/冷笑话引擎·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/减益星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/击破星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/分裂·圣杯.png is excluded by !**/*.png
  • assets/template/cw_equip/分身墨镜.png is excluded by !**/*.png
  • assets/template/cw_equip/分身墨镜Max.png is excluded by !**/*.png
  • assets/template/cw_equip/列车同行星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/动能激发剑.png is excluded by !**/*.png
  • assets/template/cw_equip/动能激发剑·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/反卫星狙击枪.png is excluded by !**/*.png
  • assets/template/cw_equip/反卫星狙击枪·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/反重力皮靴.png is excluded by !**/*.png
  • assets/template/cw_equip/反重力皮靴·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/员工投影仪.png is excluded by !**/*.png
  • assets/template/cw_equip/命运圣杯星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/和平手枪.png is excluded by !**/*.png
  • assets/template/cw_equip/圣杯.png is excluded by !**/*.png
  • assets/template/cw_equip/垃圾袋.png is excluded by !**/*.png
  • assets/template/cw_equip/夜之半神星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/天地乖离开辟之星.png is excluded by !**/*.png
  • assets/template/cw_equip/天基轨道炮.png is excluded by !**/*.png
  • assets/template/cw_equip/天基轨道炮·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/好运令牌.png is excluded by !**/*.png
  • assets/template/cw_equip/完美投影仪.png is excluded by !**/*.png
  • assets/template/cw_equip/宝石剑泽尔里奇.png is excluded by !**/*.png
  • assets/template/cw_equip/干将莫邪.png is excluded by !**/*.png
  • assets/template/cw_equip/幸运星.png is excluded by !**/*.png
  • assets/template/cw_equip/很硬的甲.png is excluded by !**/*.png
  • assets/template/cw_equip/很硬的甲·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/战场进化手册.png is excluded by !**/*.png
  • assets/template/cw_equip/战场进化手册·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/战技点星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/扑满病毒.png is excluded by !**/*.png
  • assets/template/cw_equip/扑满病毒Max.png is excluded by !**/*.png
  • assets/template/cw_equip/扑满病毒Pro.png is excluded by !**/*.png
  • assets/template/cw_equip/折叠小刀.png is excluded by !**/*.png
  • assets/template/cw_equip/护盾星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/拆装扳手.png is excluded by !**/*.png
  • assets/template/cw_equip/持续伤害星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/掩体生成枪.png is excluded by !**/*.png
  • assets/template/cw_equip/掩体生成枪·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/数据拷贝仪.png is excluded by !**/*.png
  • assets/template/cw_equip/数据拷贝仪Max.png is excluded by !**/*.png
  • assets/template/cw_equip/数据拷贝仪Pro.png is excluded by !**/*.png
  • assets/template/cw_equip/斩首行动.png is excluded by !**/*.png
  • assets/template/cw_equip/斩首行动·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/星核猎手卡带.png is excluded by !**/*.png
  • assets/template/cw_equip/星核猎手卡带Max.png is excluded by !**/*.png
  • assets/template/cw_equip/星间旅人星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/昼之半神星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/杀红眼.png is excluded by !**/*.png
  • assets/template/cw_equip/杀红眼·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/极·天地乖离开辟之星.png is excluded by !**/*.png
  • assets/template/cw_equip/极·宝石剑泽尔里奇.png is excluded by !**/*.png
  • assets/template/cw_equip/极·干将莫邪.png is excluded by !**/*.png
  • assets/template/cw_equip/极·白昼·光速螺旋桨.png is excluded by !**/*.png
  • assets/template/cw_equip/极·白昼·斩首行动.png is excluded by !**/*.png
  • assets/template/cw_equip/极·白昼·武器大师.png is excluded by !**/*.png
  • assets/template/cw_equip/极·阿瓦隆.png is excluded by !**/*.png
  • assets/template/cw_equip/欢愉卡带.png is excluded by !**/*.png
  • assets/template/cw_equip/欢愉卡带Max.png is excluded by !**/*.png
  • assets/template/cw_equip/欢愉星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/步步生花.png is excluded by !**/*.png
  • assets/template/cw_equip/步步生花·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/武器大师.png is excluded by !**/*.png
  • assets/template/cw_equip/武器大师·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/永动机.png is excluded by !**/*.png
  • assets/template/cw_equip/永动机·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/治疗星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/流星飞翼.png is excluded by !**/*.png
  • assets/template/cw_equip/流星飞翼·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/火力风暴潮.png is excluded by !**/*.png
  • assets/template/cw_equip/火力风暴潮·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/热血沸腾拳.png is excluded by !**/*.png
  • assets/template/cw_equip/热血沸腾拳·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/燃血星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/物质分解液.png is excluded by !**/*.png
  • assets/template/cw_equip/物质分解液·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/特权赋予卡.png is excluded by !**/*.png
  • assets/template/cw_equip/狼狩星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/生命之环.png is excluded by !**/*.png
  • assets/template/cw_equip/生命之环·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/生命之花.png is excluded by !**/*.png
  • assets/template/cw_equip/电光履.png is excluded by !**/*.png
  • assets/template/cw_equip/电光履·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/电磁弹射器.png is excluded by !**/*.png
  • assets/template/cw_equip/电磁弹射器·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/病毒防火墙.png is excluded by !**/*.png
  • assets/template/cw_equip/病毒防火墙Max.png is excluded by !**/*.png
  • assets/template/cw_equip/痛觉阻断芯片.png is excluded by !**/*.png
  • assets/template/cw_equip/痛觉阻断芯片·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/白昼·光速螺旋桨.png is excluded by !**/*.png
  • assets/template/cw_equip/白昼·斩首行动.png is excluded by !**/*.png
  • assets/template/cw_equip/白昼·武器大师.png is excluded by !**/*.png
  • assets/template/cw_equip/盛会之星星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/破解芯片.png is excluded by !**/*.png
  • assets/template/cw_equip/碎星斩舰刀.png is excluded by !**/*.png
  • assets/template/cw_equip/碎星斩舰刀·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/穿刺死棘之枪.png is excluded by !**/*.png
  • assets/template/cw_equip/管理员手套ProMax.png is excluded by !**/*.png
  • assets/template/cw_equip/精密拆装扳手.png is excluded by !**/*.png
  • assets/template/cw_equip/红钻.png is excluded by !**/*.png
  • assets/template/cw_equip/绝对热量.png is excluded by !**/*.png
  • assets/template/cw_equip/绝对热量·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/罪孽王冠.png is excluded by !**/*.png
  • assets/template/cw_equip/群攻星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/胜利之旗.png is excluded by !**/*.png
  • assets/template/cw_equip/胜利之旗·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/能量星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/自适应外骨骼.png is excluded by !**/*.png
  • assets/template/cw_equip/自适应外骨骼·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/蓄能帆.png is excluded by !**/*.png
  • assets/template/cw_equip/蓄能帆·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/蓝钻.png is excluded by !**/*.png
  • assets/template/cw_equip/虫洞掘进钻头.png is excluded by !**/*.png
  • assets/template/cw_equip/虫洞掘进钻头·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/行星钻地弹.png is excluded by !**/*.png
  • assets/template/cw_equip/行星钻地弹·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/诅咒·圣杯.png is excluded by !**/*.png
  • assets/template/cw_equip/诅咒·天地乖离开辟之星.png is excluded by !**/*.png
  • assets/template/cw_equip/诅咒·宝石剑泽尔里奇.png is excluded by !**/*.png
  • assets/template/cw_equip/诅咒·干将莫邪.png is excluded by !**/*.png
  • assets/template/cw_equip/诅咒·阿瓦隆.png is excluded by !**/*.png
  • assets/template/cw_equip/贝洛伯格星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/财富.png is excluded by !**/*.png
  • assets/template/cw_equip/财富宝钻.png is excluded by !**/*.png
  • assets/template/cw_equip/轮滑鞋.png is excluded by !**/*.png
  • assets/template/cw_equip/追击星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/追逐星辰.png is excluded by !**/*.png
  • assets/template/cw_equip/追逐星辰·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/量产型装甲.png is excluded by !**/*.png
  • assets/template/cw_equip/量子同频星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/金垃圾袋.png is excluded by !**/*.png
  • assets/template/cw_equip/银河学者星徽.png is excluded by !**/*.png
  • assets/template/cw_equip/闪光手榴弹.png is excluded by !**/*.png
  • assets/template/cw_equip/闪光手榴弹·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/阿瓦隆.png is excluded by !**/*.png
  • assets/template/cw_equip/随便骰子.png is excluded by !**/*.png
  • assets/template/cw_equip/随便骰子·特权.png is excluded by !**/*.png
  • assets/template/cw_equip/高周波电锯.png is excluded by !**/*.png
  • assets/template/cw_equip/高周波电锯·特权.png is excluded by !**/*.png
  • assets/template/phone_menu/nameless_honor_1/mask.png is excluded by !**/*.png
  • assets/template/phone_menu/nameless_honor_1/raw.png is excluded by !**/*.png
  • assets/template/phone_menu/nameless_honor_2/mask.png is excluded by !**/*.png
  • assets/template/phone_menu/nameless_honor_2/raw.png is excluded by !**/*.png
  • assets/template/phone_menu/nameless_honor_3/mask.png is excluded by !**/*.png
  • assets/template/phone_menu/nameless_honor_3/raw.png is excluded by !**/*.png
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (347)
  • .github/dev.md
  • .github/workflows/test-check.yml
  • .gitignore
  • AGENTS.md
  • assets/game_data/screen_info/_od_merged.yml
  • assets/game_data/screen_info/currency_war_battle.yml
  • assets/game_data/screen_info/currency_war_battle_prep.yml
  • assets/game_data/screen_info/currency_war_briefing.yml
  • assets/game_data/screen_info/currency_war_deploy_not_full.yml
  • assets/game_data/screen_info/currency_war_difficulty_confirm.yml
  • assets/game_data/screen_info/currency_war_encounter.yml
  • assets/game_data/screen_info/currency_war_invest_env.yml
  • assets/game_data/screen_info/currency_war_invest_strategy.yml
  • assets/game_data/screen_info/currency_war_lobby.yml
  • assets/game_data/screen_info/currency_war_mode_select.yml
  • assets/game_data/screen_info/currency_war_supply.yml
  • config/custom_combine_op/buy_trick_snack_route_xzlf_xchzs.yml
  • config/custom_combine_op/buy_trick_snack_route_yll6_xzq.yml
  • config/project.yml
  • deploy/OneDragon-RuntimeLauncher.spec
  • deploy/build_full.bat
  • deploy/generate_module_manifest.py
  • deploy/hook_path_inject.py
  • deploy/module_manifest.py
  • docs/develop/harness/README.md
  • docs/develop/harness/ai_tool_rules.md
  • docs/develop/harness/context_layering.md
  • docs/develop/harness/entry_files.md
  • docs/develop/harness/settings_scope.md
  • docs/develop/one_dragon/common-package-sync.md
  • docs/develop/one_dragon/runtime_launcher.md
  • docs/develop/setup/ai_coding.md
  • docs/develop/setup/chrome-devtools-mcp.md
  • docs/develop/setup/claude-code/commit-trailer.md
  • docs/develop/setup/claude-code/entry-file.md
  • docs/develop/setup/quickstart.md
  • docs/develop/sr_od/application/sim_universe.md
  • docs/develop/sr_od/backend/README.md
  • docs/develop/sr_od/backend/architecture.md
  • docs/develop/sr_od/backend/design-principles.md
  • docs/develop/sr_od/backend/entry.md
  • docs/develop/sr_od/backend/http.md
  • docs/develop/sr_od/backend/mcp-implementation.md
  • docs/develop/sr_od/backend/mcp.md
  • docs/develop/sr_od/backend/remote-ssh.md
  • docs/develop/testing/README.md
  • docs/game/README.md
  • docs/game/currency_war/README.md
  • docs/game/currency_war/data/README.md
  • docs/game/currency_war/data/advantage_layouts.md
  • docs/game/currency_war/data/bosses.md
  • docs/game/currency_war/data/characters.md
  • docs/game/currency_war/data/comp_library.md
  • docs/game/currency_war/data/competitors.md
  • docs/game/currency_war/data/economy_research.md
  • docs/game/currency_war/data/equipment.md
  • docs/game/currency_war/data/factions.md
  • docs/game/currency_war/data/gameplay.md
  • docs/game/currency_war/data/investment_strategies.md
  • docs/game/currency_war/decisions.md
  • docs/game/currency_war/strategy/01_architecture.md
  • docs/game/currency_war/strategy/02_eval_search.md
  • docs/game/currency_war/strategy/03_comp_planning.md
  • docs/game/currency_war/strategy/04_state_reconciliation.md
  • docs/game/currency_war/strategy/05_data_wiring.md
  • docs/game/currency_war/strategy/06_phases.md
  • docs/game/currency_war/strategy/07_equipment.md
  • docs/game/currency_war/strategy/08_node_decisions.md
  • docs/game/currency_war/strategy/09_meta_run.md
  • docs/game/currency_war/strategy/10_battle_and_enemies.md
  • docs/game/currency_war/strategy/11_strategy_plugin.md
  • docs/game/currency_war/strategy/12_comp_commitment.md
  • docs/game/currency_war/strategy/13_input_model.md
  • docs/game/currency_war/strategy/README.md
  • docs/game/gameplay/assignments.md
  • docs/game/gameplay/combat.md
  • docs/game/gameplay/currency_war.md
  • docs/game/gameplay/daily_training.md
  • docs/game/gameplay/div_uni.md
  • docs/game/gameplay/echo_of_war.md
  • docs/game/gameplay/email.md
  • docs/game/gameplay/guide.md
  • docs/game/gameplay/misc_apps.md
  • docs/game/gameplay/nameless_honor.md
  • docs/game/gameplay/ornamenet_extraction.md
  • docs/game/gameplay/relic_salvage.md
  • docs/game/gameplay/sim_uni.md
  • docs/game/gameplay/support_character.md
  • docs/game/gameplay/trailblaze_power.md
  • docs/game/gameplay/treasures_lightward.md
  • docs/game/gameplay/world_patrol.md
  • docs/game/mechanics/传送.md
  • docs/game/screens/README.md
  • docs/game/screens/bag.md
  • docs/game/screens/battle.md
  • docs/game/screens/character.md
  • docs/game/screens/currency_war_battle.md
  • docs/game/screens/currency_war_briefing.md
  • docs/game/screens/currency_war_deploy_warning.md
  • docs/game/screens/currency_war_difficulty_confirm.md
  • docs/game/screens/currency_war_encounter.md
  • docs/game/screens/currency_war_invest_env.md
  • docs/game/screens/currency_war_invest_strategy.md
  • docs/game/screens/currency_war_lobby.md
  • docs/game/screens/currency_war_mode_select.md
  • docs/game/screens/currency_war_prep.md
  • docs/game/screens/currency_war_supply.md
  • docs/game/screens/enter_game.md
  • docs/game/screens/large_map.md
  • docs/game/screens/misc_auxiliary.md
  • docs/game/screens/misc_screens.md
  • docs/game/screens/mission.md
  • docs/game/screens/normal_world.md
  • docs/game/screens/phone_menu.md
  • docs/game/screens/store.md
  • docs/game/screens/synthesize.md
  • docs/game/screens/team.md
  • docs/game/screens/对话.md
  • docs/game/screens/差分宇宙.md
  • docs/game/screens/模拟宇宙.md
  • pyproject.toml
  • skills/sr-od-dev-debug-automation/SKILL.md
  • skills/sr-od-dev-debug-automation/design/README.md
  • skills/sr-od-dev-debug-automation/design/case-study.md
  • skills/sr-od-dev-debug-automation/design/decisions/0001-layer-on-systematic-debugging.md
  • skills/sr-od-dev-debug-automation/design/decisions/INDEX.md
  • skills/sr-od-dev-debug-automation/design/overview.md
  • skills/sr-od-dev-deciding-a-fix/SKILL.md
  • skills/sr-od-dev-deciding-a-fix/design/decisions/0001-methodology-type-green-required.md
  • skills/sr-od-dev-deciding-a-fix/design/decisions/0002-five-step-structure.md
  • skills/sr-od-dev-deciding-a-fix/design/decisions/INDEX.md
  • skills/sr-od-dev-deciding-a-fix/design/overview.md
  • skills/sr-od-dev-pr-finishing/SKILL.md
  • skills/sr-od-dev-pr-finishing/design/decisions/0001-coderabbit-hardcoded.md
  • skills/sr-od-dev-pr-finishing/design/decisions/0002-resolve-reply-api.md
  • skills/sr-od-dev-pr-finishing/design/decisions/0003-coderabbit-state-detection.md
  • skills/sr-od-dev-pr-finishing/design/decisions/INDEX.md
  • skills/sr-od-dev-pr-finishing/design/overview.md
  • skills/sr-od-dev-pr-review/SKILL.md
  • skills/sr-od-dev-pr-review/design/decisions/0001-integration-baseline-discipline.md
  • skills/sr-od-dev-pr-review/design/decisions/0002-l0-l4-tiered-validation.md
  • skills/sr-od-dev-pr-review/design/decisions/0003-framework-semantic-checklist.md
  • skills/sr-od-dev-pr-review/design/decisions/0004-gameplay-understanding-before-diff.md
  • skills/sr-od-dev-pr-review/design/decisions/0005-conflict-resolution-strategy.md
  • skills/sr-od-dev-pr-review/design/decisions/INDEX.md
  • skills/sr-od-dev-pr-review/design/overview.md
  • src/one_dragon/base/conditional_operation/state_handler.py
  • src/one_dragon/base/config/basic_model_config.py
  • src/one_dragon/base/config/game_account_config.py
  • src/one_dragon/base/config/notify_config.py
  • src/one_dragon/base/config/one_dragon_config.py
  • src/one_dragon/base/config/yaml_operator.py
  • src/one_dragon/base/controller/pc_controller_base.py
  • src/one_dragon/base/matcher/ocr/onnx_ocr_matcher.py
  • src/one_dragon/base/operation/application/application_factory.py
  • src/one_dragon/base/operation/application/application_factory_manager.py
  • src/one_dragon/base/operation/application/application_group_config.py
  • src/one_dragon/base/operation/application/application_group_manager.py
  • src/one_dragon/base/operation/application/application_run_context.py
  • src/one_dragon/base/operation/application_base.py
  • src/one_dragon/base/operation/context_event_bus.py
  • src/one_dragon/base/operation/context_notify_event.py
  • src/one_dragon/base/operation/notify_pool.py
  • src/one_dragon/base/operation/one_dragon_app.py
  • src/one_dragon/base/operation/one_dragon_context.py
  • src/one_dragon/base/operation/one_dragon_finalizer.py
  • src/one_dragon/base/operation/operation.py
  • src/one_dragon/base/operation/operation_notify.py
  • src/one_dragon/base/push/channel/discord.py
  • src/one_dragon/base/push/push_service.py
  • src/one_dragon/base/screen/screen_info.py
  • src/one_dragon/base/screen/screen_loader.py
  • src/one_dragon/base/screen/screen_match.py
  • src/one_dragon/base/screen/screen_utils.py
  • src/one_dragon/base/screen/template_info.py
  • src/one_dragon/base/screen/template_loader.py
  • src/one_dragon/devtools/python_launcher.py
  • src/one_dragon/envs/env_config.py
  • src/one_dragon/envs/git_service.py
  • src/one_dragon/envs/python_service.py
  • src/one_dragon/launcher/application_launcher.py
  • src/one_dragon/launcher/runtime_launcher.py
  • src/one_dragon/utils/app_utils.py
  • src/one_dragon/utils/cmd_utils.py
  • src/one_dragon/utils/cv2_utils.py
  • src/one_dragon/utils/gpu_executor.py
  • src/one_dragon/utils/http_utils.py
  • src/one_dragon/utils/log_utils.py
  • src/one_dragon/utils/os_utils.py
  • src/one_dragon/yolo/onnx_model_loader.py
  • src/one_dragon/yolo/yolov8_onnx_cls.py
  • src/one_dragon/yolo/yolov8_onnx_det.py
  • src/one_dragon_qt/demo/draggable_list_demo.py
  • src/one_dragon_qt/services/app_setting/app_setting_manager.py
  • src/one_dragon_qt/view/app_run_interface.py
  • src/one_dragon_qt/view/code_interface.py
  • src/one_dragon_qt/view/devtools/devtools_image_analysis_interface.py
  • src/one_dragon_qt/view/devtools/devtools_screen_manage_interface.py
  • src/one_dragon_qt/view/devtools/devtools_template_helper_interface.py
  • src/one_dragon_qt/view/one_dragon/one_dragon_run_interface.py
  • src/one_dragon_qt/view/setting/app_notify_setting_interface.py
  • src/one_dragon_qt/view/setting/resource_download_interface.py
  • src/one_dragon_qt/view/setting/setting_custom_interface.py
  • src/one_dragon_qt/view/setting/setting_env_interface.py
  • src/one_dragon_qt/view/setting/setting_instance_interface.py
  • src/one_dragon_qt/view/setting/setting_push_interface.py
  • src/one_dragon_qt/widgets/app_run_list.py
  • src/one_dragon_qt/widgets/app_setting/app_notify_setting_flyout.py
  • src/one_dragon_qt/widgets/color_channel_dialog.py
  • src/one_dragon_qt/widgets/fast_scroll_area.py
  • src/one_dragon_qt/widgets/horizontal_setting_card_group.py
  • src/one_dragon_qt/widgets/install_card/code_install_card.py
  • src/one_dragon_qt/widgets/notify_dialog.py
  • src/one_dragon_qt/widgets/scroll_credits.py
  • src/one_dragon_qt/widgets/setting_card/app_run_card.py
  • src/one_dragon_qt/widgets/setting_card/password_switch_setting_card.py
  • src/one_dragon_qt/widgets/vertical_scroll_interface.py
  • src/one_dragon_qt/windows/main_app_window_base.py
  • src/onnxocr/inference_engine.py
  • src/onnxocr/logger.py
  • src/onnxocr/onnx_paddleocr.py
  • src/onnxocr/operators.py
  • src/onnxocr/predict_base.py
  • src/onnxocr/predict_cls.py
  • src/onnxocr/predict_det.py
  • src/onnxocr/predict_rec.py
  • src/onnxocr/predict_system.py
  • src/onnxocr/readme.md
  • src/onnxocr/utils.py
  • src/sr_od/app/__init__.py
  • src/sr_od/app/sr_application_launcher.py
  • src/sr_od/application/currency_war/__init__.py
  • src/sr_od/application/currency_war/affix_effects_data.py
  • src/sr_od/application/currency_war/currency_war_app.py
  • src/sr_od/application/currency_war/currency_war_app_factory.py
  • src/sr_od/application/currency_war/currency_war_char_id.py
  • src/sr_od/application/currency_war/currency_war_config.py
  • src/sr_od/application/currency_war/currency_war_const.py
  • src/sr_od/application/currency_war/currency_war_cv.py
  • src/sr_od/application/currency_war/currency_war_run_record.py
  • src/sr_od/application/currency_war/cw_briefing_obs.py
  • src/sr_od/application/currency_war/cw_chars.py
  • src/sr_od/application/currency_war/cw_comps.py
  • src/sr_od/application/currency_war/cw_decisions.py
  • src/sr_od/application/currency_war/cw_equipment.py
  • src/sr_od/application/currency_war/cw_factions.py
  • src/sr_od/application/currency_war/cw_identity_obs.py
  • src/sr_od/application/currency_war/cw_investments.py
  • src/sr_od/application/currency_war/cw_node_obs.py
  • src/sr_od/application/currency_war/cw_obs_core.py
  • src/sr_od/application/currency_war/cw_observation.py
  • src/sr_od/application/currency_war/cw_performance.py
  • src/sr_od/application/currency_war/cw_settlement_obs.py
  • src/sr_od/application/currency_war/cw_shop_odds.py
  • src/sr_od/application/currency_war/cw_state.py
  • src/sr_od/application/currency_war/cw_strategy.py
  • src/sr_od/application/currency_war/cw_strategy_manager.py
  • src/sr_od/application/currency_war/cw_synthesis.py
  • src/sr_od/application/currency_war/cw_telemetry.py
  • src/sr_od/application/currency_war/operations/__init__.py
  • src/sr_od/application/currency_war/operations/battle_loop.py
  • src/sr_od/application/currency_war/operations/dev/__init__.py
  • src/sr_od/application/currency_war/operations/dev/collect_portraits_op.py
  • src/sr_od/application/currency_war/operations/entry/__init__.py
  • src/sr_od/application/currency_war/operations/entry/enter_currency_war.py
  • src/sr_od/application/currency_war/operations/entry/exit_currency_war_match.py
  • src/sr_od/application/currency_war/operations/entry/start_currency_war_match.py
  • src/sr_od/application/currency_war/operations/handlers/__init__.py
  • src/sr_od/application/currency_war/operations/handlers/_overlay_confirm.py
  • src/sr_od/application/currency_war/operations/handlers/handle_briefing.py
  • src/sr_od/application/currency_war/operations/handlers/handle_deploy_not_full.py
  • src/sr_od/application/currency_war/operations/handlers/handle_encounter.py
  • src/sr_od/application/currency_war/operations/handlers/handle_invest_env.py
  • src/sr_od/application/currency_war/operations/handlers/handle_invest_strategy.py
  • src/sr_od/application/currency_war/operations/handlers/handle_select_partner.py
  • src/sr_od/application/currency_war/operations/prep/__init__.py
  • src/sr_od/application/currency_war/operations/prep/battle_prep.py
  • src/sr_od/application/currency_war/operations/prep/deploy_bench.py
  • src/sr_od/application/currency_war/operations/prep/shop.py
  • src/sr_od/application/currency_war/operations/run_nodes/__init__.py
  • src/sr_od/application/currency_war/operations/run_nodes/run_megastar_node.py
  • src/sr_od/application/currency_war/operations/run_nodes/run_node.py
  • src/sr_od/application/currency_war/operations/run_nodes/run_supply_node.py
  • src/sr_od/application/currency_war/strategies/__init__.py
  • src/sr_od/application/currency_war/strategies/default_strategy.py
  • src/sr_od/application/currency_war/tools/__init__.py
  • src/sr_od/application/currency_war/tools/harvest_equip_codex.py
  • src/sr_od/application/div_uni/__init__.py
  • src/sr_od/application/div_uni/operations/__init__.py
  • src/sr_od/application/div_uni/operations/choose_oe_file.py
  • src/sr_od/application/div_uni/operations/choose_oe_support.py
  • src/sr_od/application/div_uni/operations/ornamenet_extraction.py
  • src/sr_od/application/echo_of_war/echo_of_war_config.py
  • src/sr_od/application/trailblaze_power/trailblaze_power_app.py
  • src/sr_od/application/trailblaze_power/trailblaze_power_config.py
  • src/sr_od/application/treasures_lightward/__init__.py
  • src/sr_od/application/treasures_lightward/op/__init__.py
  • src/sr_od/application/treasures_lightward/op/challenge_mission.py
  • src/sr_od/application/treasures_lightward/op/check_max_unlock_mission.py
  • src/sr_od/application/treasures_lightward/op/check_mission_star.py
  • src/sr_od/application/treasures_lightward/op/check_star.py
  • src/sr_od/application/treasures_lightward/op/choose_character.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/__init__.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/choose_mission.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/choose_team_in_fh.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/get_reward_in_fh.py
  • src/sr_od/application/treasures_lightward/op/tl_battle.py
  • src/sr_od/application/treasures_lightward/op/tl_wait.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_app.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_config.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_const.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_record.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_team_module.py
  • src/sr_od/backend/__init__.py
  • src/sr_od/backend/backend_context.py
  • src/sr_od/backend/config_router.py
  • src/sr_od/backend/entry/__init__.py
  • src/sr_od/backend/entry/server.py
  • src/sr_od/backend/http/__init__.py
  • src/sr_od/backend/http/routes.py
  • src/sr_od/backend/http/service_routes.py
  • src/sr_od/backend/mcp/__init__.py
  • src/sr_od/backend/mcp/app.py
  • src/sr_od/backend/mcp/config_app.py
  • src/sr_od/backend/mcp/prompts.py
  • src/sr_od/backend/mcp/service_app.py
  • src/sr_od/backend/operation_registry.py
  • src/sr_od/backend/schemas.py
  • src/sr_od/context/sr_context.py
  • src/sr_od/gui/interface/devtools/mcp_service_interface.py
  • src/sr_od/gui/interface/devtools/sr_devtools_interface.py
  • src/sr_od/interastral_peace_guide/guide_choose_mission.py
  • src/sr_od/operations/back_to_normal_world_plus.py
  • src/sr_od/operations/interact/talk_interact.py
  • src/sr_od/operations/store/buy_store_item.py
  • src/sr_od/screen_state/battle_screen_state.py
  • src/sr_od/win_exe/__init__.py
  • src/sr_od/win_exe/runtime_launcher.py
  • tools/cw/extract_equip_data.py
  • tools/cw/extract_synthesis.py
  • tools/cw/gen_equip_registry.py
  • tools/cw/grid.json
  • tools/cw/harvest_equip_codex.py
  • tools/cw/harvest_equip_icons.py
  • tools/mcp/daemon/create_startup_shortcut.ps1
  • tools/mcp/daemon/sr_od_daemon.py
  • tools/mcp/daemon/start_daemon.ps1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

本次 PR 新增 sr_od 后端服务,将 SrContext 通过统一的 SrBackendContext 暴露给 MCP 与 HTTP;同时加入运行时打包、OCR/ONNX、屏幕匹配、通知配置、Qt 界面、开发文档、Skills 与 Windows CI 更新。

Changes

服务、运行时与开发基础设施

Layer / File(s) Summary
后端核心与适配器
src/sr_od/backend/..., src/sr_od/backend/entry/...
新增 SrBackendContext、单线程 RunSlot、结构化 schemas、operation 扫描/校验、MCP tools、HTTP /game/* 路由及统一 uvicorn 服务入口。
运行时、OCR 与图像基础能力
deploy/..., src/one_dragon/launcher/..., src/onnxocr/..., src/one_dragon/utils/...
新增 RuntimeLauncher 打包与模块清单生成机制,统一 ONNX session 创建/执行,并更新 OCR、下载、日志、图像及工作目录处理。
配置、屏幕、通知与 Qt 集成
src/one_dragon/base/config/..., src/one_dragon/base/screen/..., src/one_dragon/base/operation/..., src/one_dragon_qt/...
通知配置改为生命周期/细节双模式,屏幕支持 app scope 与插件 screen,应用运行结果和持久化策略更新,并新增通知设置、MCP 管理页及 FastScrollArea。
开发规范、文档与验证
.github/..., docs/..., skills/..., pyproject.toml
更新 uv 开发流程、AI harness、后端/MCP/游戏知识文档、开发 Skills、依赖与工具配置,以及 Windows 测试工作流。

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MCPClient
  participant BackendServer
  participant SrBackendContext
  participant RunSlot
  participant SrContext
  MCPClient->>BackendServer: 调用 MCP tool 或 HTTP endpoint
  BackendServer->>SrBackendContext: 转发窗口、截图、分析或运行请求
  SrBackendContext->>SrContext: 读取运行时能力与配置
  SrBackendContext->>RunSlot: 提交应用或 operation
  RunSlot-->>SrBackendContext: 返回 started、running 或 terminal 状态
  SrBackendContext-->>BackendServer: 返回结构化结果
  BackendServer-->>MCPClient: 返回 MCP/HTTP 响应
Loading

Possibly related PRs

Poem

小兔抱着胡萝卜,
后端跑进新小屋。
MCP、HTTP 手牵手,
OCR 模型稳稳走。
CI 亮起绿灯光,
代码蹦跳向远方。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 81.35% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了后端同步及 MCP 工具从 7 个扩展到 11 个的主要变更。
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/mcp-backend-sync2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

DoctorReid and others added 2 commits July 6, 2026 22:18
- PR 时 checkout sr-od-test @ github.head_ref(同名分支优先,fallback main,continue-on-error 兜底)
- PR 跑 pytest -m 'not requires_secrets',main 跑全集
- 配 sr-od-test 同名分支 PR(OneDragon-Anything/sr-od-test#1),CI 能跑到配对测试
- 注意:本 PR 自身不会触发该 workflow(GitHub pull_request 用 base 分支版本);合并到 main 后后续 PR 生效
照搬 ZZZ test-check.yml,zzz-od-test→sr-od-test 适配。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- 移除 -m 'not requires_secrets' 过滤(SR 测试仓无通知测试)
- 移除 PUSH_* env 块(SR 未配这些 secret,死重)
- 合并 PR/main 分支为单条 pytest sr-od-test/

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 19

🧹 Nitpick comments (5)
.github/workflows/test-check.yml (1)

18-21: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

通过管道执行未锁版本的远程安装脚本。

Invoke-WebRequest ... | Invoke-Expression 直接执行 astral.sh 提供的最新安装脚本,未锁定版本/哈希,若上游被篡改会直接在 CI 中执行任意代码。可考虑固定到具体版本的安装脚本 URL,或改用官方 astral-sh/setup-uv Action(内置版本锁定与缓存)。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test-check.yml around lines 18 - 21, The Install uv step
in the workflow is piping a remote install script directly into
Invoke-Expression, so replace that unsafe pattern with a pinned, verifiable
installation approach. Update the "Install uv" step to use a fixed-version
script URL or, preferably, the official astral-sh/setup-uv Action so the
workflow relies on version-locked installation and caching. Keep the change
scoped to the workflow job that runs this step.
.github/dev.md (1)

5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Python 补丁版本与 CI 不一致。

此处写死 Python 3.11.9,但 .github/workflows/test-check.yml 中 CI 使用 --python=3.11.12。建议统一版本描述(或只标注 3.11.x/3.11,与 AGENTS.md 保持一致),避免开发者本地环境与 CI 环境的补丁版本产生分歧。

📝 建议修改
-- Python 3.11.9;包管理用 uv。
+- Python 3.11(与 CI 保持一致,具体补丁版本见 workflow);包管理用 uv。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/dev.md at line 5, The Python version note in the docs is pinned to
3.11.9 while CI uses 3.11.12, so align the version text in the dev guide with
the workflow and AGENTS.md. Update the wording in the document section that
mentions Python and uv to use a consistent 3.11.x/3.11 reference or the CI patch
version, so developers follow the same environment as the test-check setup.
docs/develop/harness/README.md (1)

38-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

文档描述的 MCP 工具数量/阶段可能与本 PR 的实际实现脱节。

本文件多处(如 Line 38 "4 个感知 / 操作 tool",Line 65 B-1 状态,Line 66 B-2 "⏳ 规划")描述当前只落地 4 个感知/操作类 MCP 工具、原子操作工具(B-2)仍待规划。但根据 PR 描述,同一 PR 已将 MCP 工具从 7 个扩展到 11 个,新增了 click_game、input_text、upsert_screen_area、delete_screen_area 等原子操作与屏幕区域管理能力,这些能力看起来正对应 B-2 阶段的内容。请确认此文档是否需要同步更新工具数量与路线图状态,避免刚引入就与代码现状不一致。Based on learnings, 修改代码后应同步更新对应的 docs/develop/ 文档。

Also applies to: 59-70

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/develop/harness/README.md` at line 38, Update the harness README to
match the current MCP implementation: the “4 个感知 / 操作 tool” wording and the
B-1/B-2 roadmap in the sections around the MCP tool overview should be revised
to reflect that `SrBackendContext` now exposes 11 tools, including the new
atomic operation and screen-area management capabilities such as `click_game`,
`input_text`, `upsert_screen_area`, and `delete_screen_area`. Keep the
tool-stage descriptions aligned with the actual state of the backend and ensure
the route/map text in the README is synchronized with the symbols introduced in
the PR.

Source: Learnings

src/one_dragon/base/operation/operation_notify.py (1)

62-99: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

热路径中重复构造 notify_config,建议本地缓存引用。

operation.ctx.notify_config 是一个属性,每次访问都会重新构造 NotifyConfig(进而触发 YamlConfig 加载)。send_node_notify 单次调用中最多访问该属性 4 次(Line 244、249、345、352),send_application_notify 通过 _get_lifecycle_mode/_get_detail_mode(各自内部又访问两次)合计可达 4-6 次。由于 send_node_notify 会在每个节点结束时高频调用,重复构造可能带来不必要的 I/O/对象开销。

建议在函数入口处缓存一次 notify_config 引用后复用,例如:

⚡ 建议的优化方向(示意)
     app_id, app_name = _get_app_info(operation)
+    notify_config = operation.ctx.notify_config
     detail_mode = (
         NotifyDetailMode.ALL.value.value
         if app_id is None
-        else operation.ctx.notify_config.get_app_detail_mode(app_id)
+        else notify_config.get_app_detail_mode(app_id)
     )
     app_lifecycle_mode = (
         NotifyLifecycleMode.FINISH_ONLY.value.value
         if app_id is None
-        else operation.ctx.notify_config.get_app_lifecycle_mode(app_id)
+        else notify_config.get_app_lifecycle_mode(app_id)
     )

由于 src/one_dragon/ 属于从 ZZZ 上游整包同步的公共框架代码,本地补丁在下次同步时可能被覆盖,若确认此问题成立,建议优先在上游 ZZZ 项目修复后再同步回来。

Also applies to: 237-265, 340-352

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/one_dragon/base/operation/operation_notify.py` around lines 62 - 99,
send_application_notify and send_node_notify are repeatedly accessing
operation.ctx.notify_config, which can reconstruct NotifyConfig and trigger
extra YamlConfig loading on hot paths. Cache the notify_config once at the start
of these functions (and reuse it in _get_lifecycle_mode / _get_detail_mode or
inline their calls) so lifecycle/detail mode lookups use the same local
reference instead of re-fetching the property multiple times. Use the existing
symbols send_application_notify, send_node_notify, _get_lifecycle_mode, and
_get_detail_mode to keep the change localized and avoid repeated property
access.

Source: Learnings

pyproject.toml (1)

54-72: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

建议将 RUF002 加入忽略列表,与中文注释规范保持一致。

ignore 只包含 RUF001、RUF003,未包含 RUF002(docstring 中全角标点歧义)。由于路径指导要求注释与 docstring 必须使用中文,中文语境下全角逗号/括号非常普遍,会产生大量噪音警告(本次静态分析已在多个文件中命中),建议一并忽略。

♻️ 建议修改
-ignore = ["RUF001", "RUF003"]
+ignore = ["RUF001", "RUF002", "RUF003"]

As per path instructions, "注释与 docstring 必须使用中文,并保持现有项目风格。"

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` around lines 54 - 72, The Ruff lint configuration is missing
the `RUF002` rule in the ignore list, which will keep producing noisy warnings
for Chinese docstrings and comments. Update the `[tool.ruff.lint]` settings in
the `ignore` entry alongside `RUF001` and `RUF003` so `RUF002` is also ignored,
keeping the existing project style intact.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/test-check.yml:
- Around line 13-16: The actions/checkout step currently relies on the default
credential persistence, which leaves git credentials available to later steps.
Update each checkout usage in this workflow, including the Checkout code step
and the other two checkout calls referenced in the job, to explicitly disable
credential persistence with persist-credentials set to false. Use the
actions/checkout configuration blocks to locate and apply the change
consistently across all checkout steps.
- Around line 9-11: Explicitly add a permissions block to the test-check job so
it follows least-privilege instead of inheriting repository defaults. Update the
job definition under test-check in the workflow to declare only the minimum
required scope, using contents: read unless a specific step in this job needs
more. This change should be made in the job configuration for test-check so the
workflow’s permissions are clear and constrained.

In `@deploy/build_full.bat`:
- Around line 17-32: Several `copy` steps in `build_full.bat` can prompt for
overwrite confirmation on reruns, which can hang unattended builds. Update the
`copy` commands used for `OneDragon-Installer.exe`, `OneDragon-Launcher.exe`,
`OneDragon-RuntimeLauncher.exe`, `project.yml`, and `pyproject.toml` to use
non-interactive overwrite behavior, or clear `TARGET_DIR` before the packaging
steps. Keep the existing `xcopy` calls for directories, and make the change in
the same build flow around the `TARGET_DIR`/`DIST_DIR` copy sequence.

In `@deploy/module_manifest.py`:
- Line 66: The manifest still contains legacy sr.* imports that will fail under
the current package layout; update the import entries in the manifest generation
logic to use sr_od.* instead of sr.app.*, sr.context.*, sr.operation.*, and
sr.treasures_lightward.*. Keep valid imports like from unittest import result
unchanged, and adjust the affected manifest-building code in module_manifest.py
so all referenced modules match the current package structure.

In `@docs/develop/one_dragon/common-package-sync.md`:
- Around line 39-44: The validation section currently limits linting to only
sr_od files, which can miss syntax or import issues introduced in the synced
public packages. Update the verification steps in the common-package sync guide
so the post-sync checks also cover the synchronized one_dragon, one_dragon_qt,
and onnxocr content with a minimal validation pass, while still keeping
sr_od-specific checks separate where appropriate.

In `@docs/develop/one_dragon/runtime_launcher.md`:
- Around line 93-95: The wording in the runtime launcher docs is too broad
because it says SR has “no CI,” which is no longer accurate after the new test
CI was added. Update the related bullet in the documentation to use the correct
scope, and make sure the description around generate_module_manifest.py and
build_full.bat clearly says there is no automated packaging/release CI rather
than no CI at all.

In `@docs/develop/setup/ai_coding.md`:
- Around line 144-146: The fenced block in the documentation snippet is missing
a language identifier, causing markdownlint MD040 to fire. Update the fenced
block around the Co-Authored-By footer in the setup guide by adding an
appropriate language tag such as text or gitcommit, and keep the content
unchanged so the markdown remains valid and lint-friendly.

In `@docs/develop/setup/claude-code/commit-trailer.md`:
- Around line 107-111: The early exit in the commit trailer update flow is too
broad: in the trailer handling logic, do not return just because a Claude Code
co-author trailer already exists, since that prevents --amend from refreshing
the model-specific trailer. Update the behavior in the trailer-writing step to
detect and replace or refresh the existing model trailer while preserving the
Claude Code trailer, and keep the logic centered around the trailer
insertion/rewriting path that uses git interpret-trailers.

In `@docs/develop/sr_od/backend/architecture.md`:
- Around line 17-30: Update the architecture doc’s tool/method inventory to
match the actual backend symbols. In the `mcp/app.py` section, replace the
outdated “7 个 `@mcp.tool`” count with the current 11 tools and keep the list
aligned with `create_mcp_server`; in `backend_context.py`, extend the method
list beyond `close_game` to include the existing `click_game`, `input_text`,
`upsert_screen_area`, and `delete_screen_area`. Make sure the counts and names
stay consistent with the current implementation.

In `@docs/develop/sr_od/backend/design-principles.md`:
- Around line 20-25: Update the “读源码 / Read / Grep / Glob” example in
design-principles.md because it still references the old OpenAndEnterGame entry
name; replace it with the current finer-grained tool name(s) used in this
codebase or rephrase the example as a generic “进游戏链路” description so readers are
not directed to a stale API. Use the existing table entry and surrounding
guidance to keep the wording aligned with the current tool surface.

In `@docs/develop/sr_od/backend/remote-ssh.md`:
- Around line 22-24: The daemon port numbers are inconsistent between the
startup command and the MCP client registration example, so unify them to a
single port throughout this section. Update the start_daemon.ps1 default port
reference, the example MCP URL, and any related wording so they all match the
same daemon port, keeping the remote-ssh.md guidance consistent for readers.
- Around line 13-18: Update the topology diagram fenced block in the remote SSH
markdown doc to include a language tag, using the existing diagram section so it
is marked as text instead of a bare fence. Keep the content unchanged and adjust
the opening fence in the diagram block to use text, which will satisfy
markdownlint MD040.

In `@skills/sr-od-dev-deciding-a-fix/SKILL.md`:
- Around line 32-40: In the Quick Reference table within SKILL.md, add the
missing blank line separation before and after the markdown table so it complies
with markdownlint MD058. Keep the table content unchanged and adjust the
surrounding spacing around the Quick Reference section to remove the lint
warning.

In `@skills/sr-od-dev-pr-finishing/SKILL.md`:
- Around line 21-24: The fenced shell command blocks in SKILL.md are missing the
bash language tag, causing markdownlint MD040. Update both command blocks around
the gh api graphql examples (including the later block referenced by the
comment) to use bash-labeled fences so they render and lint correctly.

In `@src/one_dragon_qt/widgets/horizontal_setting_card_group.py`:
- Around line 32-36: The add_card method in HorizontalSettingCardGroup is making
each card participate in horizontal stretch by using a nonzero stretch factor,
which causes cards to expand instead of keeping their natural width. Update
add_card so the card is added to h_layout with a stretch of 0 while keeping the
existing alignment, and leave the placeholder/spacer logic to absorb extra
space.

In `@src/one_dragon/base/screen/screen_info.py`:
- Around line 96-110: `upsert_area` in `ScreenInfo` is not propagating the
screen-level `pc_alt`, so inserted or replaced `ScreenArea` entries can drift
from the `ScreenInfo.__init__` YAML normalization. Update `upsert_area` to
ensure any incoming `ScreenArea` is aligned with `self.pc_alt` before storing
it, both in the replace path and the append path, so downstream logic that reads
`area.pc_alt` always sees the current screen configuration.

In `@src/onnxocr/logger.py`:
- Around line 23-41: _LoggerShim in logger.py is dropping logging kwargs such as
exc_info because info/debug/warning/error only format the message and never
forward the remaining keyword arguments to od_log. Update the upstream
implementation of _LoggerShim so these methods preserve and pass through logging
kwargs while still supporting message formatting, then sync the fix back into
this shared package rather than patching it locally in the SR repo.

In `@src/sr_od/backend/backend_context.py`:
- Around line 375-389: The analyze() OCR/matching path is not serialized and can
race with background operations, causing DirectML session contention and cache
corruption. Update backend_context.analyze() so the calls to
OcrService.get_ocr_result_list() and find_screen_matches() run through the same
GPU execution guard used elsewhere, or add a shared lock inside
OcrService/OnnxOcrMatcher to protect _cache, _cache_list, and self._model.ocr()
from concurrent access, keeping the current write_back behavior unchanged.

In `@tools/mcp/daemon/sr_od_daemon.py`:
- Around line 90-121: `start_sr_od_mcp_server` has a TOCTOU race between
`find_sr_od_mcp_server_process()`, `is_port_in_use(port)`, and the
`subprocess.Popen` launch, so concurrent calls can both pass the checks and
start duplicate servers. Add a mutual-exclusion guard around the entire
check-and-start flow (for example a process-wide lock or other startup
serialization in `sr_od_daemon.py`) so only one caller can evaluate
`existing_proc`/port state and invoke `Popen` at a time. Keep the existing
`process.poll()` and logging behavior, but ensure the lock covers the full
critical section from the initial checks through process creation.

---

Nitpick comments:
In @.github/dev.md:
- Line 5: The Python version note in the docs is pinned to 3.11.9 while CI uses
3.11.12, so align the version text in the dev guide with the workflow and
AGENTS.md. Update the wording in the document section that mentions Python and
uv to use a consistent 3.11.x/3.11 reference or the CI patch version, so
developers follow the same environment as the test-check setup.

In @.github/workflows/test-check.yml:
- Around line 18-21: The Install uv step in the workflow is piping a remote
install script directly into Invoke-Expression, so replace that unsafe pattern
with a pinned, verifiable installation approach. Update the "Install uv" step to
use a fixed-version script URL or, preferably, the official astral-sh/setup-uv
Action so the workflow relies on version-locked installation and caching. Keep
the change scoped to the workflow job that runs this step.

In `@docs/develop/harness/README.md`:
- Line 38: Update the harness README to match the current MCP implementation:
the “4 个感知 / 操作 tool” wording and the B-1/B-2 roadmap in the sections around the
MCP tool overview should be revised to reflect that `SrBackendContext` now
exposes 11 tools, including the new atomic operation and screen-area management
capabilities such as `click_game`, `input_text`, `upsert_screen_area`, and
`delete_screen_area`. Keep the tool-stage descriptions aligned with the actual
state of the backend and ensure the route/map text in the README is synchronized
with the symbols introduced in the PR.

In `@pyproject.toml`:
- Around line 54-72: The Ruff lint configuration is missing the `RUF002` rule in
the ignore list, which will keep producing noisy warnings for Chinese docstrings
and comments. Update the `[tool.ruff.lint]` settings in the `ignore` entry
alongside `RUF001` and `RUF003` so `RUF002` is also ignored, keeping the
existing project style intact.

In `@src/one_dragon/base/operation/operation_notify.py`:
- Around line 62-99: send_application_notify and send_node_notify are repeatedly
accessing operation.ctx.notify_config, which can reconstruct NotifyConfig and
trigger extra YamlConfig loading on hot paths. Cache the notify_config once at
the start of these functions (and reuse it in _get_lifecycle_mode /
_get_detail_mode or inline their calls) so lifecycle/detail mode lookups use the
same local reference instead of re-fetching the property multiple times. Use the
existing symbols send_application_notify, send_node_notify, _get_lifecycle_mode,
and _get_detail_mode to keep the change localized and avoid repeated property
access.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 705a9881-22af-4869-8a96-7022dee5409b

📥 Commits

Reviewing files that changed from the base of the PR and between f24784b and a60fcff.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (143)
  • .claude/CLAUDE.md
  • .github/dev.md
  • .github/workflows/test-check.yml
  • .gitignore
  • AGENTS.md
  • config/project.yml
  • deploy/OneDragon-RuntimeLauncher.spec
  • deploy/build_full.bat
  • deploy/generate_module_manifest.py
  • deploy/hook_path_inject.py
  • deploy/module_manifest.py
  • docs/develop/harness/README.md
  • docs/develop/harness/ai_tool_rules.md
  • docs/develop/harness/context_layering.md
  • docs/develop/harness/entry_files.md
  • docs/develop/harness/settings_scope.md
  • docs/develop/one_dragon/common-package-sync.md
  • docs/develop/one_dragon/runtime_launcher.md
  • docs/develop/setup/ai_coding.md
  • docs/develop/setup/claude-code/commit-trailer.md
  • docs/develop/setup/quickstart.md
  • docs/develop/sr_od/backend/README.md
  • docs/develop/sr_od/backend/architecture.md
  • docs/develop/sr_od/backend/design-principles.md
  • docs/develop/sr_od/backend/entry.md
  • docs/develop/sr_od/backend/http.md
  • docs/develop/sr_od/backend/mcp.md
  • docs/develop/sr_od/backend/remote-ssh.md
  • pyproject.toml
  • skills/sr-od-dev-deciding-a-fix/SKILL.md
  • skills/sr-od-dev-deciding-a-fix/design.md
  • skills/sr-od-dev-pr-finishing/SKILL.md
  • skills/sr-od-dev-pr-finishing/design.md
  • skills/sr-od-dev-skill-guide/SKILL.md
  • skills/sr-od-dev-skill-guide/design.md
  • src/one_dragon/base/conditional_operation/state_handler.py
  • src/one_dragon/base/config/basic_model_config.py
  • src/one_dragon/base/config/game_account_config.py
  • src/one_dragon/base/config/notify_config.py
  • src/one_dragon/base/config/yaml_operator.py
  • src/one_dragon/base/controller/pc_controller_base.py
  • src/one_dragon/base/matcher/ocr/onnx_ocr_matcher.py
  • src/one_dragon/base/operation/application/application_factory_manager.py
  • src/one_dragon/base/operation/application_base.py
  • src/one_dragon/base/operation/context_event_bus.py
  • src/one_dragon/base/operation/context_notify_event.py
  • src/one_dragon/base/operation/notify_pool.py
  • src/one_dragon/base/operation/one_dragon_app.py
  • src/one_dragon/base/operation/one_dragon_context.py
  • src/one_dragon/base/operation/operation_notify.py
  • src/one_dragon/base/screen/screen_info.py
  • src/one_dragon/base/screen/screen_loader.py
  • src/one_dragon/base/screen/screen_match.py
  • src/one_dragon/base/screen/screen_utils.py
  • src/one_dragon/base/screen/template_info.py
  • src/one_dragon/base/screen/template_loader.py
  • src/one_dragon/devtools/python_launcher.py
  • src/one_dragon/envs/env_config.py
  • src/one_dragon/envs/git_service.py
  • src/one_dragon/launcher/runtime_launcher.py
  • src/one_dragon/utils/app_utils.py
  • src/one_dragon/utils/cv2_utils.py
  • src/one_dragon/utils/gpu_executor.py
  • src/one_dragon/utils/http_utils.py
  • src/one_dragon/utils/log_utils.py
  • src/one_dragon/yolo/onnx_model_loader.py
  • src/one_dragon/yolo/yolov8_onnx_cls.py
  • src/one_dragon/yolo/yolov8_onnx_det.py
  • src/one_dragon_qt/demo/draggable_list_demo.py
  • src/one_dragon_qt/services/app_setting/app_setting_manager.py
  • src/one_dragon_qt/view/app_run_interface.py
  • src/one_dragon_qt/view/code_interface.py
  • src/one_dragon_qt/view/devtools/devtools_image_analysis_interface.py
  • src/one_dragon_qt/view/devtools/devtools_screen_manage_interface.py
  • src/one_dragon_qt/view/devtools/devtools_template_helper_interface.py
  • src/one_dragon_qt/view/one_dragon/one_dragon_run_interface.py
  • src/one_dragon_qt/view/setting/app_notify_setting_interface.py
  • src/one_dragon_qt/view/setting/resource_download_interface.py
  • src/one_dragon_qt/view/setting/setting_env_interface.py
  • src/one_dragon_qt/view/setting/setting_instance_interface.py
  • src/one_dragon_qt/view/setting/setting_push_interface.py
  • src/one_dragon_qt/widgets/app_run_list.py
  • src/one_dragon_qt/widgets/app_setting/app_notify_setting_flyout.py
  • src/one_dragon_qt/widgets/color_channel_dialog.py
  • src/one_dragon_qt/widgets/fast_scroll_area.py
  • src/one_dragon_qt/widgets/horizontal_setting_card_group.py
  • src/one_dragon_qt/widgets/install_card/code_install_card.py
  • src/one_dragon_qt/widgets/notify_dialog.py
  • src/one_dragon_qt/widgets/scroll_credits.py
  • src/one_dragon_qt/widgets/setting_card/app_run_card.py
  • src/one_dragon_qt/widgets/setting_card/password_switch_setting_card.py
  • src/one_dragon_qt/widgets/vertical_scroll_interface.py
  • src/one_dragon_qt/windows/main_app_window_base.py
  • src/onnxocr/inference_engine.py
  • src/onnxocr/logger.py
  • src/onnxocr/onnx_paddleocr.py
  • src/onnxocr/operators.py
  • src/onnxocr/predict_base.py
  • src/onnxocr/predict_cls.py
  • src/onnxocr/predict_det.py
  • src/onnxocr/predict_rec.py
  • src/onnxocr/predict_system.py
  • src/onnxocr/readme.md
  • src/onnxocr/utils.py
  • src/sr_od/app/sr_application_launcher.py
  • src/sr_od/application/div_uni/__init__.py
  • src/sr_od/application/div_uni/operations/__init__.py
  • src/sr_od/application/div_uni/operations/choose_oe_file.py
  • src/sr_od/application/div_uni/operations/choose_oe_support.py
  • src/sr_od/application/div_uni/operations/ornamenet_extraction.py
  • src/sr_od/application/trailblaze_power/trailblaze_power_app.py
  • src/sr_od/application/treasures_lightward/__init__.py
  • src/sr_od/application/treasures_lightward/op/__init__.py
  • src/sr_od/application/treasures_lightward/op/challenge_mission.py
  • src/sr_od/application/treasures_lightward/op/check_max_unlock_mission.py
  • src/sr_od/application/treasures_lightward/op/check_mission_star.py
  • src/sr_od/application/treasures_lightward/op/check_star.py
  • src/sr_od/application/treasures_lightward/op/choose_character.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/__init__.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/choose_mission.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/choose_team_in_fh.py
  • src/sr_od/application/treasures_lightward/op/forgotten_hall/get_reward_in_fh.py
  • src/sr_od/application/treasures_lightward/op/tl_battle.py
  • src/sr_od/application/treasures_lightward/op/tl_wait.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_app.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_config.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_const.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_record.py
  • src/sr_od/application/treasures_lightward/treasures_lightward_team_module.py
  • src/sr_od/backend/__init__.py
  • src/sr_od/backend/backend_context.py
  • src/sr_od/backend/entry/__init__.py
  • src/sr_od/backend/entry/server.py
  • src/sr_od/backend/http/__init__.py
  • src/sr_od/backend/http/routes.py
  • src/sr_od/backend/mcp/__init__.py
  • src/sr_od/backend/mcp/app.py
  • src/sr_od/backend/schemas.py
  • src/sr_od/win_exe/__init__.py
  • src/sr_od/win_exe/runtime_launcher.py
  • tools/mcp/daemon/create_startup_shortcut.ps1
  • tools/mcp/daemon/sr_od_daemon.py
  • tools/mcp/daemon/start_daemon.ps1
💤 Files with no reviewable changes (3)
  • src/one_dragon/base/conditional_operation/state_handler.py
  • src/sr_od/app/sr_application_launcher.py
  • src/one_dragon_qt/widgets/notify_dialog.py

Comment thread .github/workflows/test-check.yml
Comment thread .github/workflows/test-check.yml
Comment thread deploy/build_full.bat Outdated
Comment thread deploy/module_manifest.py
Comment thread docs/develop/one_dragon/common-package-sync.md
Comment thread src/one_dragon_qt/widgets/horizontal_setting_card_group.py
Comment thread src/one_dragon/base/screen/screen_info.py
Comment thread src/onnxocr/logger.py
Comment thread src/sr_od/backend/backend_context.py Outdated
Comment thread tools/mcp/daemon/sr_od_daemon.py Outdated
DoctorReid and others added 4 commits July 7, 2026 10:43
…est-check

CI test-check 报 ModuleNotFoundError: No module named 'one_dragon'/sr_od
(src-layout + package=false,pytest 默认不加 src/ 到 sys.path)。
照搬 ZZZ pyproject 的 pytest pythonpath 配置,pytest 自动加 src/。
顺带省掉本地手动 PYTHONPATH=src。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- test-check.yml: 加 permissions: contents: read(最小权限)+ persist-credentials: false(3 个 checkout,防 artipacked 凭据残留)
- build_full.bat: copy 加 /Y(防 rerun 时交互式覆盖确认挂起无人值守构建)
CodeRabbit #605 review 处理(MAJOR 2 个 push back:module_manifest 是兼容性门禁数据非执行 / backend_context analyze 照搬 ZZZ 上游问题)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…I 措辞

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
cal_pos/sim_uni 集成测试 init_for_world_patrol 加载 YOLO 模型;loader 默认走
ghfast.top 代理在 CI 下载失败 → 切 backup(None) → os.path.join 崩。
CI 直连 github release 预下载 yolov8n-640-simuni-0601 到 loader 期望目录
(world_patrol + sim_uni),check_model_exists 通过不触发下载。
(OCR 用另一套 ZipDownloader,CI 里已能下;仅 YOLO 的 urllib+代理路径有此问题。)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
.github/workflows/test-check.yml (2)

64-66: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

下载步骤缺少重试机制,网络抖动可能导致 CI 间歇性失败。

Invoke-WebRequest 未配置重试参数,一次瞬时网络问题就会使整个 job 失败,需要重跑整个 CI。

🔁 建议增加重试参数
-          Invoke-WebRequest -Uri $url -OutFile $tmp
+          Invoke-WebRequest -Uri $url -OutFile $tmp -MaximumRetryCount 3 -RetryIntervalSec 5
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test-check.yml around lines 64 - 66, The download step in
the workflow lacks retry handling, so a transient network failure can break the
job. Update the PowerShell step that uses Invoke-WebRequest to add retry logic
(for example, retry the download a few times with a short delay) around the $url
and $tmp download block so the CI can recover from intermittent failures without
rerunning the whole workflow.

64-68: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

模型版本号在 URL 与目标目录名中重复硬编码,建议提取为变量。

yolov8n-640-simuni-0601 同时出现在下载 URL(Line 64)和解压目标目录名(Line 68)。未来升级模型版本时若只改了其中一处,check_model_exists 可能因目录名不匹配而误判模型不存在,导致该预下载步骤形同虚设且难以排查。

♻️ 建议提取为变量
+          $modelVersion = "yolov8n-640-simuni-0601"
-          $url = "https://github.com/OneDragon-Anything/OneDragon-YOLO/releases/download/sr_model/yolov8n-640-simuni-0601.zip"
+          $url = "https://github.com/OneDragon-Anything/OneDragon-YOLO/releases/download/sr_model/$modelVersion.zip"
           $tmp = "$env:TEMP\yolo.zip"
           foreach ($cat in @("world_patrol", "sim_uni")) {
-            $dst = "assets\models\$cat\yolov8n-640-simuni-0601"
+            $dst = "assets\models\$cat\$modelVersion"
             New-Item -ItemType Directory -Force -Path $dst | Out-Null
             Expand-Archive -Path $tmp -DestinationPath $dst -Force
           }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test-check.yml around lines 64 - 68, The model version
string is duplicated in both the download URL and the destination directory
path, which can drift out of sync. Update the workflow block that builds the URL
and the $dst path to use a single shared variable for the model version in this
PowerShell step, so changes to the version only need to be made once and remain
consistent for check_model_exists.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/test-check.yml:
- Around line 64-66: The download step in the workflow lacks retry handling, so
a transient network failure can break the job. Update the PowerShell step that
uses Invoke-WebRequest to add retry logic (for example, retry the download a few
times with a short delay) around the $url and $tmp download block so the CI can
recover from intermittent failures without rerunning the whole workflow.
- Around line 64-68: The model version string is duplicated in both the download
URL and the destination directory path, which can drift out of sync. Update the
workflow block that builds the URL and the $dst path to use a single shared
variable for the model version in this PowerShell step, so changes to the
version only need to be made once and remain consistent for check_model_exists.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c328489a-2cdf-408e-b35d-c6531daa73bd

📥 Commits

Reviewing files that changed from the base of the PR and between db851d6 and df5ace5.

📒 Files selected for processing (1)
  • .github/workflows/test-check.yml

DoctorReid and others added 4 commits July 7, 2026 13:46
…ackend_context

- _save_screenshot 从 mcp/app 提到 backend_context(MCP/HTTP 共享,去重)
- analyze 现在落盘截图 + AnalyzeScreenResult +screenshot_path 字段
- mcp/app + http/routes 用共享 _save_screenshot
- 重提 RunSlot executor shutdown + spec 路径(照搬覆盖后加回)
照搬 ZZZ backend(补 sync2 遗漏的 analyze-screenshot 重构)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- application_run_context +last_application_result(backend run-slot 固化终态用)
- + application_factory、push_service、devtools/python_launcher、
  envs/python_service、utils/{cmd,cv2,os}、setting 接口、predict_det 等内容更新
- sr_od 无需适配:GUI 启动无 traceback、pyright 0 error
- application_factory_manager/one_dragon_context/screen_match 经 token 适配后
  内容与 HEAD 一致(仅 CRLF),无内容变更
照搬 ZZZ common(#2460),验证 GUI 启动 + pyright 干净。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- operation_registry: operation 反射扫描/解析/args 校验(_SCAN_ROOTS 适配 sr_od.operations,无 hollow_zero)
- mcp/service_app: run_one_dragon / list_operations / describe_operation / run_operation 工具
- mcp/prompts: MCP prompt 工具(check_status_guide 等)
- http/service_routes: HTTP 应用运行端点 + /health
- backend_context/mcp.app/http.routes/schemas/entry: 配套(schemas +OperationInfo 等)
- GUI: devtools/mcp_service_interface(MCP server 管理页)+ app_devtools_interface
- psutil: 必需依赖
- 重提 RunSlot executor shutdown + spec 路径
照搬 ZZZ #2460,token 适配 + operation_registry 扫描根适配 SR。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- README/architecture/entry/http/mcp 同步 #2460(MCP 应用运行能力、operation_registry、service_app/prompts/service_routes、/health)
- architecture scan_operations 描述适配 SR(sr_od.operations,无 hollow_zero)
- module_manifest regenerate(166 imports,+新 backend 模块)
照搬 ZZZ backend 文档(#2460),token 适配。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@DoctorReid

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/sr_od/backend/backend_context.py (1)

318-325: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

关闭 backend 前先停止并等待活动运行退出。

RunSlot.shutdown() 仅执行 shutdown(wait=False),不会取消已运行的线程;随后 Line 837 会清理 SrContext 资源,而 Operation 仍可能继续访问控制器、OCR 或配置,且非 daemon 的线程池线程还可能阻止进程退出。请先发送 stop_running(),等待当前 future 结束,再执行 after_app_shutdown()。

Based on learnings, src/sr_od/backend 必须与上游 ZZZ 保持一致;请先在 ZZZ 修复后同步回 SR,避免 backend drift。

Also applies to: 829-837

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/sr_od/backend/backend_context.py` around lines 318 - 325, 先在上游 ZZZ 修复对应
backend 关闭流程,再将该修复同步到 SR,避免分叉;更新 RunSlot.shutdown() 及 backend 关闭路径,使其先调用
stop_running() 并等待活动 future 完成,再调用 after_app_shutdown() 清理 SrContext 资源,最后关闭线程池。

Source: Learnings

🧹 Nitpick comments (2)
src/sr_od/backend/mcp/service_app.py (1)

155-156: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

为 op_factory 补上类型注解

def op_factory(ctx) 仍然缺少参数和返回值标注,和项目的强制类型注解要求不一致。这里直接标成 ctx: SrContext、返回 Operation,并去掉 # noqa: ANN202;SrContext 和 Operation 可在 TYPE_CHECKING 下分别从 sr_od.context.sr_context、one_dragon.base.operation.operation 导入。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/sr_od/backend/mcp/service_app.py` around lines 155 - 156, 为 op_factory
补充完整类型注解,将 ctx 标注为 SrContext、返回值标注为 Operation,并移除 # noqa: ANN202;在 TYPE_CHECKING
块中分别导入 sr_od.context.sr_context.SrContext 和
one_dragon.base.operation.operation.Operation。

Source: Coding guidelines

src/sr_od/backend/http/service_routes.py (1)

175-176: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

补齐新函数和 Qt 类成员的类型注解。

  • src/sr_od/backend/http/service_routes.py#L175-L176: 为 op_factory 标注 SrContext 参数和 Operation 返回类型,类型专用导入放入 TYPE_CHECKING。
  • src/sr_od/gui/interface/devtools/mcp_service_interface.py#L217-L222: 为 finished Signal 补充类型。
  • src/sr_od/gui/interface/devtools/mcp_service_interface.py#L264-L270: 为两个 QTimer 成员补充类型。
  • src/sr_od/gui/interface/devtools/mcp_service_interface.py#L278-L323: 为新增 card、button 和 message-box 成员补充类型。

As per coding guidelines, **/*.py: 所有函数签名和类成员变量都必须有类型注解。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/sr_od/backend/http/service_routes.py` around lines 175 - 176, 为
src/sr_od/backend/http/service_routes.py:175-176 的 op_factory 补充 SrContext 参数和
Operation 返回类型,并将仅用于类型检查的导入放入 TYPE_CHECKING。为
src/sr_od/gui/interface/devtools/mcp_service_interface.py:217-222 的 finished
Signal、264-270 的两个 QTimer 成员,以及 278-323 新增的 card、button 和 message-box
成员补充准确类型注解,确保所有函数签名和类成员变量符合类型注解要求。

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/sr_od/backend/backend_context.py`:
- Around line 741-768: 调整 run_standalone_app 与 _start 的默认应用解析时机:显式传入的 app_id
继续立即使用,但未传入时不要在刷新前读取 active_app_id。将默认独立应用的解析移入 refresh_config
执行完成后的槽线程流程,确保使用刷新后的 _ctx.standalone_app_config.active_app_id;无可用应用时仍抛出
BackendNotReadyError。
- Around line 350-355: Update the screenshot-writing flow around cv2.imwrite in
the backend context to encode the BGR image with cv2.imencode and write the
encoded ndarray using tofile, preserving the existing screenshot path and
raising an explicit RuntimeError when encoding or writing fails.

In `@src/sr_od/backend/operation_registry.py`:
- Around line 239-272: 在 validate_args() 中增加未知参数校验:先根据 cls.__init__ 的参数定义排除
self、ctx 及可变参数后,拒绝 args 中未声明的键并返回明确的参数错误。保留现有必填参数、类型和 JSON 可序列化校验逻辑,确保 cls(ctx,
**args) 执行前即可发现拼写错误或额外参数。
- Around line 196-236: 更新 resolve_op_class,使 op_id 只能匹配扫描阶段基于 _SCAN_ROOTS 生成的可运行
Operation 白名单;在 import_module 前拒绝不在白名单中的模块或类,并复用扫描阶段对 Application、抽象类及 *Base
的过滤结果。保留现有格式、定义模块和 Operation 子类校验,避免通过 HTTP/MCP 解析任意未公开内部类。
- Around line 98-120: Update _annotation_json_serializable’s Union handling to
ignore NoneType branches before evaluating serializability, and require every
remaining branch to be JSON-serializable so CustomType | None is rejected while
valid scalar unions remain accepted.

In `@src/sr_od/gui/interface/devtools/mcp_service_interface.py`:
- Around line 82-91: 更新 _find_server_process() 以接收当前端口,严格匹配完整的 “-m
sr_od.backend.entry.server --port <端口>” 参数,并仅返回 cwd 与 _project_root() 一致的进程;同时将
_stop_server() 改为接收 port,并在所有调用处传入当前端口,确保停止操作只针对当前项目和端口的 server。

---

Outside diff comments:
In `@src/sr_od/backend/backend_context.py`:
- Around line 318-325: 先在上游 ZZZ 修复对应 backend 关闭流程,再将该修复同步到 SR,避免分叉;更新
RunSlot.shutdown() 及 backend 关闭路径,使其先调用 stop_running() 并等待活动 future 完成,再调用
after_app_shutdown() 清理 SrContext 资源,最后关闭线程池。

---

Nitpick comments:
In `@src/sr_od/backend/http/service_routes.py`:
- Around line 175-176: 为 src/sr_od/backend/http/service_routes.py:175-176 的
op_factory 补充 SrContext 参数和 Operation 返回类型,并将仅用于类型检查的导入放入 TYPE_CHECKING。为
src/sr_od/gui/interface/devtools/mcp_service_interface.py:217-222 的 finished
Signal、264-270 的两个 QTimer 成员,以及 278-323 新增的 card、button 和 message-box
成员补充准确类型注解,确保所有函数签名和类成员变量符合类型注解要求。

In `@src/sr_od/backend/mcp/service_app.py`:
- Around line 155-156: 为 op_factory 补充完整类型注解,将 ctx 标注为 SrContext、返回值标注为
Operation,并移除 # noqa: ANN202;在 TYPE_CHECKING 块中分别导入
sr_od.context.sr_context.SrContext 和
one_dragon.base.operation.operation.Operation。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e3a428e-f0d3-425d-8df6-33644f2adc79

📥 Commits

Reviewing files that changed from the base of the PR and between db851d6 and e492782.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (31)
  • .github/workflows/test-check.yml
  • deploy/module_manifest.py
  • docs/develop/sr_od/backend/README.md
  • docs/develop/sr_od/backend/architecture.md
  • docs/develop/sr_od/backend/entry.md
  • docs/develop/sr_od/backend/http.md
  • docs/develop/sr_od/backend/mcp.md
  • pyproject.toml
  • src/one_dragon/base/operation/application/application_factory.py
  • src/one_dragon/base/operation/application/application_run_context.py
  • src/one_dragon/base/push/push_service.py
  • src/one_dragon/devtools/python_launcher.py
  • src/one_dragon/envs/python_service.py
  • src/one_dragon/utils/cmd_utils.py
  • src/one_dragon/utils/cv2_utils.py
  • src/one_dragon/utils/os_utils.py
  • src/one_dragon_qt/view/setting/setting_custom_interface.py
  • src/one_dragon_qt/view/setting/setting_env_interface.py
  • src/one_dragon_qt/view/setting/setting_push_interface.py
  • src/onnxocr/predict_det.py
  • src/sr_od/backend/backend_context.py
  • src/sr_od/backend/entry/server.py
  • src/sr_od/backend/http/routes.py
  • src/sr_od/backend/http/service_routes.py
  • src/sr_od/backend/mcp/app.py
  • src/sr_od/backend/mcp/prompts.py
  • src/sr_od/backend/mcp/service_app.py
  • src/sr_od/backend/operation_registry.py
  • src/sr_od/backend/schemas.py
  • src/sr_od/gui/interface/devtools/mcp_service_interface.py
  • src/sr_od/gui/interface/devtools/sr_devtools_interface.py
💤 Files with no reviewable changes (1)
  • src/one_dragon_qt/view/setting/setting_push_interface.py
✅ Files skipped from review due to trivial changes (4)
  • deploy/module_manifest.py
  • docs/develop/sr_od/backend/mcp.md
  • docs/develop/sr_od/backend/http.md
  • docs/develop/sr_od/backend/README.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • pyproject.toml
  • src/onnxocr/predict_det.py
  • .github/workflows/test-check.yml

Comment thread src/sr_od/backend/backend_context.py
Comment thread src/sr_od/backend/backend_context.py
Comment thread src/sr_od/backend/operation_registry.py
Comment thread src/sr_od/backend/operation_registry.py
Comment thread src/sr_od/backend/operation_registry.py
Comment thread src/sr_od/gui/interface/devtools/mcp_service_interface.py
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

- python_launcher/python_service: 启动器同步运行环境文案(582d9984)
- setting_instance_interface: 删除账号前二级确认框(a3365dc4)
- .devin/wiki.json: Deep Wiki 生成配置(3c6309c9,zzz→sr 适配)
照搬 ZZZ common + 工具配置,token 适配。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
DoctorReid and others added 28 commits August 7, 2026 01:44
…ibuteError)

cw_decisions._best_improving_action line 477 用 GameState.BENCH_CAPACITY(类属性,不存在)
→ 部署满(deployed>=max_units)时求值右操作数 → AttributeError → BuyShopCards 异常 →
battle_loop 卡 round 3(bench 累积满才触发,故 round1/2 没崩)。改用模块常量 BENCH_CAPACITY
(cw_state,=9)+ import。ruff 净;45 decisions 测试绿。live 验:restart+re-run battle_loop
round 3 无异常、retry=0 顺畅推进。battle_loop 跑通全 loop + char tracking 主循环 seed
确认(log: tracked_bench=[艾丝妲,阿格莱雅,藿藿])。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
全 match live 观测:bot board 全程 8 阵营 spread → form_progress 永不达 COMMIT_FRAC →
target 永不 commit → flit(巡击青雀/万敌单C/DOT队 跨轮变 → 每轮买不同阵营 = spread 根因)→
弱 comp → 死 plane2 r1。修:maybe_pivot _committed 加 round 门槛 —— 累计轮 (plane-1)*9+round
≥4 也算 commit → round4 强 sticky → plan 一致买 target 阵营深 stack(spread 止血)。

ruff 净;200 cw 测试绿。select_comp favor board-align(清 log 根治方向)后续。
+ decisions D-85(gold 放大修)+ D-86(本条)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…避 churn) + D-87

T#97 step-1 验证 match 观察:bot target sticky(巡击青雀)但 board 全程 spread(不买 target 阵营
追击/仙舟)。根因:synergy off-target discount=1.0(无偏好)→ target 阵营卡无优先 → 散买 → comp 不成型。
修:synergy_score 对 target_comp 阵营 ×TARGET_FACTION_BONUS(1.5),off-target 保持 1.0(不惩罚,避
清 log 0.3 churn)。F3 超线性 + target bonus → 深 stack target >> 散 off-target。

ruff 净;200 cw 测试绿(改 1 test 断言:已成型 eval > base,因 target bonus 总加成)。
live 验待(下局:bot 买 target 阵营深 stack + comp 成型 + 能否过 plane2)。
+ decisions D-87。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…死 plane2 r1 vs r4)

1.5× live 验 counterproductive —— 死 plane2 r1(vs step-1-only 死 plane2 r4)。根因:1.5×
over-commit 弱-early 追击(target bonus × close-to-next 在 count 2 激励冲 tier 3)→ 追击 tier-1
弱 → HP 掉快 → 进 plane2 弱 → 死 r1。设 1.0(disable,恢复 step-1-only best-known)。step-2 idea
留代码(tune 方向:更低 1.2 / conditional 只 tier-activated / 不 ×close-to-next)。ruff 净;45 测试绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…避 over-rush 弱-early)

D-88 step-2(1.5× on whole tier_score 含 close-to-next)counterproductive:over-rush 弱-early 追击
(count 2 冲 tier 3 via close-to-next)→ HP 掉快 → 死 plane2 r1(vs step-1 r4)。tune:bonus **只加在
_base_tier(tier 部分)**,close-to-next 不加 → 奖励深化(count≥tier 阈值)非 rush(count 2)。re-enable 1.5。
ruff 净;85 decisions/comps 测试绿。live 验待(下局:追击 深化 不 rush + HP 稳 + 能否过 plane2)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
结算屏 OCR 偶 garble「生命值」→「命值」(missing 生)→ parse_settlement_hp 只匹配「生命值」
→ 失败 → hp_after=0 → PerformanceTracker 拿错 hp(多 match on_round_end hp=0 conf=0)。
修:也匹配「命值」(两形态都试)。 Enables 准确 on_round_end hp → PerformanceTracker trend →
未来 comp_viability(观测 hp trend 弱 comp 弃,清 log 方向)。ruff 净;21 obs 测试绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…pivot 阈值)

cw_performance 已有 PerformanceTracker.recent_hp_loss_trend / is_losing_streak / comp_viability
(P1.5 建好但未接 maybe_pivot;hp garble fix e440e49 使 trend 可信)。接线:maybe_pivot signal 1,
comp 观测 losing(is_losing_streak)→ _required_gap ×0.7(更易转走;非强制,降阈值 conservative)。
committed+losing → ×1.5×0.7=×1.05(几乎不粘 → 该转)。obs-driven(清 log 方向)。
ruff 净;55 comps/strategy 测试绿。live 验待(下局:losing comp 早 pivot 不死扛)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
partner overlay 两步:① select candidate(bond)→ confirm → ②「请选择强化角色」select own char → confirm。
旧 handler 只做 step 1 → step 2 时 confirm 不关 overlay(等角色选择)→ flat-loop(6th match stuck 根因)。
修:confirm 后 overlay 仍在 + 检测「请选择强化角色」→ 点前排-1(strengthen target)→ confirm → 验关。
ruff 净。这是 reset 根因(partner overlay 盲操作);step2 补全后 handler 完整。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…stage/bench)

step2 strengthen target = overlay 中心立绘(~960,300;click-test:点中心 → 已选择 badge →
确认 → overlay 关)。非 stage 前排(overlay 覆盖不可点)/ 非 bench(不可点)。根治 partner flat-loop。
partner overlay 两步完整:① select candidate → ② 中心立绘 select strengthen → 确认关 overlay。
ruff 净。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…因同类)

partner overlay reset 根因(点了就 round_success 不验关)在 6/7 事件 handler 普遍存在:
megastar/supply/encounter/invest_env/invest_strategy/deploy_not_full 均 click+confirm→success,
无 overlay 关验证、无 bug#1 mouse_move 缓解 → bug#1 吞 click / 隐藏多步 → 无限 flat-loop
(partner reset 同类;write-operation「反模式:点了≠成了」)。

加共享助手 _overlay_confirm(safe_click=bug#1 mouse_move 缓解;confirm_and_verify=
点确认→验入口词消失→没关 round_retry 计节点预算兜底,不再无限 flat-loop;find_text_center
OCR 定位确认按钮)+ 6 handler 接入。briefing 已正确验关(id_mark 重检→retry),仅去 tag。

护栏:运行 op 前查 #未验证 → review write-operation 出口验证 → 补日志 → 删 tag。
ruff 净;currency_war 201 测试绿(2 次)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
实跑 round1 live 观察(用户叫停):shop=[追击/飞霄×3] target=巡击青雀,plan 却先 Refresh
→ 追击全没 → 买 off-target → spread。根因:simulate(RefreshShop) 不建模换 shop(只扣金),
贪心误以为 Refresh 后还能买当前 target;实跑 Refresh 清空 target。

修:Refresh 候选加门 not _shop_has_buyable_target(target 在场且买得起 → 抑制 Refresh 先买;
买完才 Refresh 找更多)。auto-chess 基本功:确定收益 > 蒙特卡洛乐观赌注。
45 cw_decisions 测试绿。decisions.md D-90。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…counter)

用户首要任务「所有决策操作接入策略」全面自检(对照 design 08):
接入 4(买/invest_env/invest_strategy/遭遇)、未接 4(补给/巨星/伙伴/部署)。
根因:decide_* 策略钩子就绪但 handler 不调(硬编码默认)或 option 全空。不是没设计,是没接线。

本提交接入遭遇(P0):新建 cw_node_obs.read_encounter_options(OCR 标题「遭遇其X」→difficulty
+ 奖励带→reward)→ HandleEncounter 调 strategy.decide_encounter(difficulty+成型度选,非硬编码左)。
加 StrategySession.last_state(BuyShopCards 每回合存 board/deployed 快照)→ overlay handler 读成型度。

offline baseline 核实(2 卡 diff 1/4 + reward 正确)+ 4 单测绿;全 205 cw 测试绿。
decisions D-91 + strategy/08 接线状态表。余补给/巨星/伙伴(decide_* 就绪缺 reader)/部署(blocked 身份)待接。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
live round4-6 验证(D-90 后):target=DOT队 commit sticky,但 shop/board 始终无 持续伤害/减益 卡
→ comp 建不成 → HP4 死 plane1。根因:commit(D-86 把 pivot gap ×1.5)+ 全 comp shop-dry →
无 comp 超 gap 转走 → 锁死不可达 target。

修:update_target 追踪 session.target_drought(target 阵营连续多少轮 shop_supply<1.0);
≥3 → 弃 target(=None)→ select_comp(shop-aware)重选买得到的 comp。3 轮阈值避正常 shop 波动。
2 单测绿(drought 3→bail / shop 供上→归0);全 207 cw 测试绿。decisions D-92。
live 验待(下局 target 不可达时不再锁死)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
live round8 读 hp=100 实际 29(round9 同款读对)→ 间歇时序(入口过渡帧 HP 区未渲染)。
hp 驱动 maybe_pivot 保命信号 + _phase_weights 保血权重 → 误读100→误判满血→不保血/不切保命→失血死。

修:hp>=HP_MAX 时重读2次(各sleep0.4+重截图)取首个<100 的值;都100则维持(真满血/HP区空)。
满血无额外延迟(重读仍100);间歇误读→重读取真值。ruff 净;全207 cw 测试绿。decisions D-93。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
D-93 retry live 无效(round4 prep 读 hp=100 实际 58 persist;HP 区持续空非时序,retry 救不了)。
保血/maybe_pivot hp_safe 信号失效 → 失血死。

修:on_round_end 达阈置信结算 hp_after → 存 session.last_hp;BuyShopCards prep state.hp 优先用
session.last_hp(结算屏小队生命值可靠),首回合 None 退 read_hp。结算 HP 是不同源的可靠值,根治。
2 单测绿(达阈存/低置信不污染);全 207 cw 测试绿。D-93 保留作首回合兜底。decisions D-94。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
决策接线 audit(D-91)巨星未接(handler 默认左候选)。live cw-snap 捕获 megastar 核实
候选名 OCR 可读(花火/星期日 盛会之星)→ 建 reader。

新建 cw_node_obs.read_megastar_options(OCR「盛会之星一X先生/女士!」→ MegastarOption);
RunMegastarNode._do_action 改 read 候选 → decide_megastar(select_megastar 按 target.core_chars)
→ 点选中 idx(替代默认左)+ bug#1 mouse_move。盛会之星给全队 buff,选契合 comp 的。
offline cw_megastar 核实(2 候选读对)+ 2 单测绿;全 211 cw 测试绿。decisions D-95。
T#99 接线:遭遇(D-91)+ 巨星(D-95)✅,余 supply/partner/deploy。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…set 同类)

live round8 卡死 9min:巨星两步(step1 候选+confirm → step2 请选择强化角色+confirm),旧 RunMegastarNode
只 1 次 confirm → step2 残 → overlay 不关 → 主循环误判 prep、出战 click 落空 → 死循环。
partner overlay reset(T#98)同类。手动 confirm@(1490,560)实测跳过强化推进(强化可选)。

修:_do_action step1 confirm 后,OCR 见「请选择强化角色」→ 再 confirm 跳过强化,overlay 关。
ruff 净;211 cw 测试绿。decisions D-96。live 验待(下局巨星节点不卡)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
… confirm)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…unNode 版)

battle_loop 巨星/补给走 RunMegastarNode/RunSupplyNode(D-89 review 发现);HandleMegastar/HandleSupply
是 dead code(无 .execute() 调用,只注释/docstring 引用)。删之(single-source),更新 3 处注释引用。
211 cw 测试绿,imports OK。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
D-96(再 confirm)是错诊:step2 强化角色实为**可选**(选完盛会之星 → confirm 直接跳过 → overlay 关)。
真根因:RunNode retry **re-click 候选 → toggle 反选** → confirm 时无候选 → 不推进 → 卡死。
用户点醒:别见「强化角色未选择」文本不变就假设失败;该文本非阻断,确认钮 active。实测星期日选中后
confirm 即关 overlay。

修:_do_action 加 _candidate_clicked flag → 候选只点一次(retry 只重 confirm)。megastar 选中态视觉
(金边,非 OCR)→ flag 替 partner「已选择」守卫。step2 非阻断(D-96 降级安全网)。
ruff 净;211 cw 测试绿。decisions D-97 + skill 反馈(状态文本≠失败先验)。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
megastar 节点(round8)需选「强化角色」(bot 暂未解 → 每局卡死)。根因:bot 买 off-target 盛会之星
char → 持有盛会之星 → 触发 megastar 节点。

避开法(治根):target 不含盛会之星 时,prefilter **永远跳过**盛会之星 卡(不论 shop 有无 target)。
不持有盛会之星 → megastar 节点不触发 → 不卡。待 megastar 强化角色选择解决后移除此 workaround。
ruff 净;211 cw 测试绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
D-98(避开盛会之星)错误:盛会之星是核心 bond,有 comp 需要它;且 megastar 是固定节点(非持有触发)。
revert。

D-97b:instance flag → session flag(跨 loop re-dispatch 持久)。根因:new RunMegastarNode 实例
重置 instance flag → re-click 候选 toggle 反选 → confirm 无候选 → 卡死。session flag 跨实例持久 →
候选只点一次(全 match)→ confirm 完成。211 测试绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
用户反复要求「接入决策」。旧 DeployBench = v1 naive 填位(从槽0拖全部,不看 position_pref)。
plan() 已算 DeployMove(bench_idx, to_row) 但 shop.py 跳过。

接线:
① StrategySession.pending_deploys(list[DeployMove])
② shop.py:关商店前存 plan 的 DeployMove 到 session
③ DeployBench:读 pending_deploys → _deploy_strategic(按 to_row front/back 拖到对应排空槽)
  无 pending_deploys → 回退 _deploy_naive(旧行为)
④ 部署剩余 bench 角色(naive 补满,不漏)
ruff 净;211 cw 测试绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…新点候选)

D-97b session flag 跨整个 match 保持 → plane2 megastar 节点 flag 仍 True(从 plane1)→ 候选不点 → 卡。
修:_in_node 返回 False(overlay 关 = 节点完成)→ 重置 megastar_candidate_clicked=False。
每个 megastar 节点独立(每 plane ≥1)。ruff 净;211 测试绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…x错位)+ D-99巨星查证

- 采全71角色图鉴半身立绘(CollectPortraits op 白框法:点卡片→CV白框定位→crop;对齐HarvestEquipCodex;多帧OCR补det漏)
- load_avatar_templates 修中文路径(np.fromfile+imdecode,cv2.imread中文挂)
- resolve_char_name 加CW库中文key直接返(CW库key中文名,非主游英文id)
- deploy_bench 切CW库+_deploy_by_identity(按角色position_pref,替代D-100 tracked_bench idx错位)
- D-99 巨星触发查证(持有盛会之星→弹,推断未亲眼验证,docstring/doc/decisions标待验证TODO)
- deploy实机验:read_bench_chars识别5(藿藿/艾丝妲/大丽花/飞霄/那刻夏STRONG)+身份驱动按position_pref拖

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…6s 修)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
…bail 放宽3→5(T#97)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- 复用 screen_info area 替换全屏 round_by_ocr(零测量):购买经验/商店/出战/
  投资策略/投资环境/未达上限/创业指南 → round_by_find_area(_and_click)
- 新建 按钮-收起 area(shop toggle,坐标交叉验 视觉框落 按钮-商店 同按钮内)
- 遵守 od-dev-write-operation ADR-0004/0008:固定位置元素压倒性默认区域识别,
  全屏 LCS 子序列误匹配结构性消除。行为保持(同文本同位置 OCR 限区)
- 余 ~60 处(结算屏/overlay 标题/弹窗)待逐屏截图建档续做(D-103)

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@DoctorReid

Copy link
Copy Markdown
Collaborator Author

该分支不再作为后端同步的主线,关闭此 PR。

@DoctorReid DoctorReid closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant